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

GithubOAuth tells users to distribute their client secrets #43

Open
sebbert opened this issue Jan 20, 2017 · 3 comments
Open

GithubOAuth tells users to distribute their client secrets #43

sebbert opened this issue Jan 20, 2017 · 3 comments

Comments

@sebbert
Copy link
Contributor

sebbert commented Jan 20, 2017

The GithubOAuth example uses OAuth2's authorization code grant.
This is fine if you can delegate the authorization to a server you own and store the client secret there, but this isn't the case here. The README instructs users to paste their client secret into the app. This is a very bad idea™, as these can very easily be extracted from the exported package.

To be fair, there is a security warning in the README, but "Note:" is not how you tell people about fundamental security flaws.

There does exist another OAuth flow, implicit grant, which doesn't require a client secret. GitHub does not support this, however.

We should either provide some basic server code, or switch to a different provider for this example.

@kristianhasselknippe
Copy link
Member

i'm not sure i want to remove the example completely as i think it serves some instructional value (the flow doesn't change that much with a different grant type..); what if we just made the "Note" into a big disclaimer and changed the wording into something a bit more agressive?

What do you think @sebbert ?

@sebbert
Copy link
Contributor Author

sebbert commented Jan 20, 2017

Seems like a good solution to me 👍

@sebbert
Copy link
Contributor Author

sebbert commented Jan 20, 2017

Also, I'm expanding the section on OAuth in the REST article quite a bit, so we'll have some more docs on this soon.

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