Skip to content

Security concerns around embedding OAuth client_secret in frontend? #24796

Discussion options

You must be logged in to vote

Thanks @kamicut!

So, it seems like the primary risk is that if someone could easily get your Client Secret (i.e. read it in your front-end application’s source code) and then could somehow intercept the Authorization Code (e.g. look through a browser’s history for redirect URLs, such as when Github redirects back to “http://…redirect_uri…/?code=abc123”), then that person would be able to easily generate an auth token for that user.

So in closing, it is not okay to embed your client_secret in a frontend application.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment