Github backend doesn't work with non-OAuth type apps
See original GitHub issueNow unless I’m misunderstanding something, this library does not work with github. But not the regular OAuth type apps, regular Github apps. Despite the endpoints and everything being the same, this type of app (which I guess is differentiated by the token) does not support the redirect_state
parameter. It kept complaining about the redirect_uri
not matching up exactly, despite the exact same set up working with regular OAuth apps.
I solved this by subclassing the backend and overriding the option.
class MyGithubOAuth2(GithubOAuth2):
REDIRECT_STATE = False
Am I doing something wrong, or was this never tested? Perhaps just not supported? Don’t see anything in the documentation regarding this.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
auth: throw error when scopes are requested that are not ...
When using OAuth via a GitHub App, the scopes requested by the frontend via getAccessToken are completely ignored. This is quite error prone, ......
Read more >Github Backend doesn't work for remote sites · Issue #2328
works perfectlty but fails for any remote site on the internet. On remote, NetlifyCMS shows a dialog to sign in via Netlify but...
Read more >Github backend requires full organization account access #4329
However, the OAuth backend requires full read/write access to all repos of that organization and a more fine-grained selection of grants is not...
Read more >Troubleshooting OAuth App access token request errors
To solve this error, make sure you have the correct credentials for your OAuth App. Double check the client_id and client_secret to make...
Read more >Differences between GitHub Apps and OAuth Apps
An OAuth App acts as a GitHub user, whereas a GitHub App uses its own identity when installed on ... Who can install...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We have the same problem too. We’re building a code review application for GitHub and GitLab at https://code.gitmate.io.
Our current implementation of authentication is provided by using OAuth2 with social-auth-django. But owing to several features provided by the GitHub App infrastructure, like increased API rate limitations, one single app account that works on all repos, we’d like to migrate our architecture to work as a GitHub App.
This is not about User-Server OAuth, I’m talking about Server(App)-Server(GitHub) communication.
Although it does not work like OAuth, we need to have some sort of storage mechanism with Django. Using PyJWT with the provided RSA key, there should be some method of generating an access token.
CC @sils @fneu @GitMateIo
FTR I am using the latest version and my
SOCIAL_AUTH_GITHUB_KEY
andSOCIAL_AUTH_GITHUB_SECRET
are pointing to the values from a GitHub App, not an OAuth app.The GH app itself is configured with
Request user authorization (OAuth) during installation
(I don’t think that matters in my case) and points toexample.com/complete/github/
. Users are perfectly able to authorize my GitHub App and login on the site like they were with the older OAuth app.I don’t see any particular information about how others’ GitHub Apps are configured (again, not sure if and when that matters) but seems like this feature just works in the most basic use-case and we can close this issue.
I am seeing a different issue (not sure if related). Will post separately.