Django-allauth Third-Party Login Failure

245 Views Asked by At

I've got an instance of an application where I'm trying to authenticate users using Google/Github. All the configuration is as documented, the callbacks are as required by the docs, the client ID and secrets are alright.

Yet, when receiving the callback, I get shown the following page

The callback url i am getting is (with no error msg):

http://localhost:8000/accounts/github/login/callback/?code=1216195be45faf4d04af&state=jYUTOFAXVKeiqzpk

I do not know what code and state in uri is referring to.

The page I am getting redirected to after login attempt

I was using version 0.61.1

Downgrading to 0.54.0 and removing allauth.account.middleware.AccountMiddleware middleware solved the problem. But now I can not use LinkedIn Open ID Connect authentication as it is not supported in version 0.54.0.

Looking for the solution so that i can use google,github, and linkedin social auth in version 0.61.1

2

There are 2 best solutions below

0
Юлия Зыкова On

Good day! I found this information and it helps me. You need to modify it in you admin site. Django-allauth "client" code it is "appid".

When I changed it "client" to the appid using the Django admin, problem solved.

0
Ajas Mohammed On

I also had the same issue and it happened because I missed a letter while providing the client_secret. So try checking the credentials to see if you missed anything.