Reputation: 35256
I'm trying to create a github app using just static pages with no server side logic. Is there a way to get an access token without having to make the access token post with a secret key?
This code is going to be on a public repo served with gh-pages
, so I can't store the secret key. I know dropbox and other oauth providers allow this, is there any way to do with github?
Reference: https://developer.github.com/guides/basics-of-authentication/#providing-a-callback
Upvotes: 2
Views: 383
Reputation: 18762
No -- it's not possible to complete the GitHub OAuth flow from client-side JavaScript. You need to use a server component.
Upvotes: 2