开发者

What authentication options do you have in django?

开发者 https://www.devze.com 2023-01-25 14:40 出处:网络
I\'m new to django, are there many choices for user authentication (in terms of plugins) or is there just one way to do it开发者_StackOverflow?There\'s one correct way to log a user in, but there are

I'm new to django, are there many choices for user authentication (in terms of plugins) or is there just one way to do it开发者_StackOverflow?


There's one correct way to log a user in, but there are many, may, many potential authdbs.


The socialauth module provides you one click login options via various OpenId Providers like (Google, Yahoo, custom etc) + Twitter + Facebook. Read more about socialauth at http://uswaretech.com/blog/2009/08/django-socialauth-login-via-twitter-facebook-openid-yahoo-google/ and source is on github https://github.com/uswaretech/Django-Socialauth


If you want to allow your users to signup/singin with Twitter, Facebook and OpenID (i.e. Google and others), I suggest django-socialregistration. A few months ago when I did a research it was the most straightforward and complete such library out there, and now it looks like it's I was right as it's gaining momentum in Django community.

Edit

Django gurus also use django-socialregistration: http://www.revsys.com/officehours/2010/nov/05/#question27 :-)


You have many choices to choose from. You can use Django's default user authentication, Django-OpenID, and a lot more. One of the easiest app to setup is 'django_openid_auth'. You can view the snippets here: http://djangosnippets.org/snippets/2183/

0

精彩评论

暂无评论...
验证码 换一张
取 消