Django AllAuth安装 [英] Django AllAuth Installation

查看:163
本文介绍了Django AllAuth安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装和配置Django AllAuth,我遇到了很多障碍。我害怕我只是错过了一些可能会清除某些内容的基本概念。

I'm attempting to install and configure Django AllAuth and I've run into a plethora of obstacles. Im afraid I'm simply missing a few basic concepts which might clear some things up.

1)为了获得基本的社交认证,需要在什么设置中完成社会供应商(facebook,twitter等)

1) In order to get basic social authentication working what setup needs to be done inside the social provider (facebook, twitter, etc..)

2)如果是这样的话,那么在本地开发如何,因为乍看之下,twitter的API设置它询问对于重定向网址,会让毛发考虑到现在的所有东西在本地托管。

2) If this is the case then how would one develop locally because at first glance of twitter's API setup it asks for redirect URLs which would get hairy considering everything right now is hosted locally.

3)当我尝试去 / accounts / login / 时,它重定向到 / accounts / profile / 。似乎找不出导致这种重定向的原因。

3) When I try and go to /accounts/login/ it redirects to /accounts/profile/ every time. Can't seem to figure out what's causing this redirect.

4)我以前使用过Userena进行用户身份验证,并将添加django-social-auth,但是当我遇到困难时,然后我发现AllAuth似乎完全符合我的需要,但再次遇到一些问题。任何人都可以衡量这个决定,你会推荐一个,如果是这样,为什么?感谢您的帮助。

4) I was previously using Userena for my user authentication and was going to add django-social-auth but when I got into it that was giving me difficulty. I then found AllAuth which seemed to fit my needs perfectly but again, having some issues. Can anyone weigh in on this decision, would you recommend one over the other and if so why? Thanks for your help.

更新:
Facebook错误:
应用程序配置不允许使用URL:一个或多个应用的设置不允许给定的网址,它必须与网站网址或画布网址匹配,否则域必须是其应用程序域名的子域名。

UPDATE: Facebook Error: "Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."

当我点击好了,它会重定向回我的网站。我的浏览器给我一个安全错误,当我继续通过,我结束了在我的网站显示:
社交网络登录失败
尝试通过您的社交网络帐户登录时出现错误。

When I click okay it redirects back to my site. My browser gives me a security error and when I proceed through that I end up back at my site displaying: "Social Network Login Failure An error occurred while attempting to login via your social network account."

推荐答案

1)看看这里: https://speakerdeck.com/tedtieken/signing-up-and-signing-in-users-in-django-with-django-allauth

1) Have a look here: https://speakerdeck.com/tedtieken/signing-up-and-signing-in-users-in-django-with-django-allauth

(具体来说,幻灯片61及以上)

(specifically, slide 61 and above)

2)只需使用127.0.0.1:您的重定向网址中有8000个

2) Simply use 127.0.0.1:8000 in your redirect URLs

3)默认情况下,allauth重定向到 LOGIN_REDIRECT_URL / accounts / profile /: https://docs.djangoproject.com/en/dev / ref / settings /#login-redirect-url

3) By default allauth redirects to LOGIN_REDIRECT_URL, which is set out of the box to /accounts/profile/: https://docs.djangoproject.com/en/dev/ref/settings/#login-redirect-url

4)由于我是allauth的作者,我会跳过回答这个问题我自己浏览完整的演示文稿1) - 初始幻灯片提供了各种选项的良好比较。

4) As I am the author of allauth I will skip answering this question myself. Browse through the complete presentation referred to by 1) -- the initial slides provide a good comparison of the various options.

这篇关于Django AllAuth安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆