微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

AuthFailed at /oauth/complete/github/ Django 中的社交登录错误

如何解决AuthFailed at /oauth/complete/github/ Django 中的社交登录错误

身份验证失败:redirect_uri 必须与此应用程序的注册回调 URL 匹配。

我已经注册了我的 github 帐户,我设置的回调 url 是:http://localhost:8000/oauth/complete/github/ 和主页 url http://localhost:8000/ 但错误仍然存​​在.并在 settings.py LOGIN_REDIRECT_URL = 'home'

重定向 Url

我尝试了许多其他技术,请帮助我

我的urls.py

from django.contrib import admin
from django.urls import path,include
from django.conf.urls.static import static
from django.conf import settings
from developer import views

urlpatterns = [
    path('admin/',admin.site.urls),path('',views.home_view,name='home'),path('profileEdit',views.profile_edit_form,name='profileEdit'),path('accounts/',include('accounts.urls')),path('<int:pk>',views.profile_view,name='profileview'),path('invites/',views.invites_view,name='invitesview'),path('invites/<int:pk>',views.inviter_view,name='inviterview'),path('oauth/',include('social_django.urls',namespace='social')),]+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。