首页 > 解决方案 > django-microsoft-auth:为输入参数“redirect_uri”提供的值无效

问题描述

我正在 Azure AD 和 Django 的帮助下创建单点登录 (SSO)。我在用

蟒蛇==3.8

姜戈==3.1

django-microsoft-auth==2.4.0

我按照https://django-microsoft-auth.readthedocs.io/en/latest/usage.html上的教程进行操作

但是当我在完成 10 个步骤后尝试使用注册电子邮件 ID 登录时出现此错误。我使用的天蓝色广告中的重定向 URI 是https://localhost:8080/microsoft/auth-callback/ 在此处输入图像描述

标签: python-3.xazuredjango-rest-frameworksingle-sign-ondjango-3.1

解决方案


问题是我给了 https 而不是 http 作为重定向 URI

所以而不是

https://localhost:8080/microsoft/auth-callback/

利用

http://localhost:8080/microsoft/auth-callback/

同样在我使用的 postgresql 数据库中,我们应该提供值

本地主机:8080

进入表django_site


推荐阅读