Skip to content

API key not configurable #14

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

Open
mikayla-maki opened this issue Jan 5, 2017 · 4 comments
Open

API key not configurable #14

mikayla-maki opened this issue Jan 5, 2017 · 4 comments

Comments

@mikayla-maki
Copy link

After a quick scan of the minified code and the documentation, I don't seen any way to change the NameShouts API key without changing the source. Should this be a <meta> (to continue with the pure markup theme of the API) or should it be part of a new API (e.g. new Vocalizer(apiKey))?

@atifazam
Copy link
Owner

atifazam commented Jan 9, 2017

Yeah, it's not ideal that the API key is within the source. I made it this way in order to keep the implementation as simple as possible.

I think putting the API as a <meta> would make sense. Want to implement this?

@mikayla-maki
Copy link
Author

mikayla-maki commented Jan 10, 2017

I'd love to work on this!

And you took the words right out of my mouth!

That said, forcing a token to be part of the HTML could make them easy to steal, and it could make a users existing JS token system harder to use (if that system assumes you'll be passing variables to JavaScript.).

@mikayla-maki
Copy link
Author

mikayla-maki commented Jan 10, 2017

Hmmm.... looking into the name shouts API, it seems like the only way to keep the key a secret is to send the request on the server.

@atifazam
Copy link
Owner

Yeah, maybe we're better off just keeping it the way it is w/ one universal API key? Let me know if you have any other ideas. Thanks for looking into it!

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

No branches or pull requests

2 participants