Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access without clientID or clientSecret #8

Open
EdwinGuzman opened this issue Jul 19, 2018 · 2 comments
Open

Access without clientID or clientSecret #8

EdwinGuzman opened this issue Jul 19, 2018 · 2 comments

Comments

@EdwinGuzman
Copy link
Member

@nonword, @kfriedman and I were talking about how a non-nypl developer can contribute to our apps. They would need a clientId and clientSecret and we can manage the scopes to give them the right access. Unfortunately, right now adding scopes is not something we'll be working on soon.

So we were chatting about making a few API endpoints public, such as:
https://platform.nypl.org/api/v0.1/book-lists/staff-picks/2018-06

So now there's a developer who can update Staff Picks without needing a clientId or clientSecret`. The only problem is that this module requires an oauth key and secret. What do you suggest would be a good approach to updating this module so that it doesn't require it? Perhaps some flag that says it's okay to not authenticate because we know that the calls we're making are on public API endpoints?

Let me know what you think.

@nonword
Copy link
Member

nonword commented Jul 19, 2018

The options param to any call accepts an authenticate parameter that can be set to false to override the auth requirement. For apps that only need to fetch Avro schemas (i.e. endpoints that don't require a token) this has been useful. e.g.

client.get('current-schemas/Item', { authenticate: false }).then((resp) => { ... 

@EdwinGuzman
Copy link
Member Author

I missed that. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants