Closed onekiloparsec closed 3 years ago
My mistake, I forgot to update the client secret in my .env
file after playing around.
Indeed, it is the frontend responsability of checking state consistency, I understand that.
What strucked me was that I wondered whether I should create an application in the oauth2_provider Django admin, for GitHub, and with what kind of parameters etc. The similar library of yours drf-social-auth2
requires to create such app before going further.
Hi. I am having troubles to make a GitHub OAuth2 workflow working. I always get the same error:
social_core.exceptions.AuthFailed: Authentication failed: The code passed is incorrect or expired.
I am not sure it is related, but I noticed that STATE_PARAMETER (although being set as
True
for GitHub), is always set to False by this library. Why ? And what the comment is actually implying ? I couldn't find any documentation about it.My workflow is the following:
https://github.com/login/oauth/authorize
with correct parameters (includingstate
built on page loading)./auth/social/token/
Authentication failed: The code passed is incorrect or expired.
(in theauth_complete
method ofBaseOAuth2
class insidesocial_core
.Thanks!