Social Network Login Failure on Django, Callback url mismatched

376 views Asked by At

I have problem for attaching social login. I have tried google login on local, it was fine. But when I try for deploy, Non-public domain is not supported. I`m not sure *.link is non-public domain, but it did not work for some reason. So I am trying to do github login, but I have following errors.. There is callback URL mismatch, but I don't know which URL should I use.

Im using on Github this URL : https://taeheejo.link/user/githubin/github/login/callback/

urls.py

...
path('admin/', admin.site.urls),
path('user/', include('authy.urls')),
path('sub/', include('tier.urls')),
...

authy/urls.py

...
path('login/', authViews.LoginView.as_view(template_name='registration/login.html'), name='login'),
path('githubin/', include('allauth.urls')),
...

And Here is an Error..

enter image description here

I have added on admin pannel sitename and application too..

Can someone please tell me which part am I missing?

1

There are 1 answers

0
Asad Ali On

I was suffering from this issue, at the end I found that I was missing redirect urls from my developer account. These are some key points to do it correctly: Make sure you have added correct redirect and logout url. And then make sure you have added CLIENT SECRET and API KEY correctly in django-admin panel.And don't forget to add sites from django-admin panel.