never build a login again - the art of using social auth using django

24
1 Never build a login again: The art of using social auth with Django - Nikunj Thakkar

Upload: nikunjness

Post on 16-Jul-2015

445 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Never build a login again - The art of using social Auth using Django

1

Never build a login again: The art of using social auth with

Django

- Nikunj Thakkar

Page 2: Never build a login again - The art of using social Auth using Django

2

Who am I?

● Jr. Programmer Analyst @IshiSystems● Co-organizer @JavaMeetup● Core Team member @GBGAhmedabad● More : www.nikunjthakkar.com● @nikunjness

Page 3: Never build a login again - The art of using social Auth using Django

3

Long story.....

https://www.flickr.com/photos/arctia/14485645868/in/set-72157632729016111

More : https://news.ycombinator.com/item?id=4603204and

http://stackoverflow.com/questions/549/the-definitive-guide-to-form-based-website-authentication

Page 4: Never build a login again - The art of using social Auth using Django

4

We believe in

Code Re-use

https://www.flickr.com/photos/110751683@N02/13334080323/in/photostream/

Page 5: Never build a login again - The art of using social Auth using Django

5

Agility

We believe in

https://www.flickr.com/photos/vfsdigitaldesign/5396691102

Page 6: Never build a login again - The art of using social Auth using Django

6

We believe in

Rapid development

https://www.flickr.com/photos/katiekrueger/2351656805

Page 7: Never build a login again - The art of using social Auth using Django

7

We believe in

Mobile-first

https://www.flickr.com/photos/aakashgautam/8497909263

Page 8: Never build a login again - The art of using social Auth using Django

8

Our customers

are not

zombieshttp://notbuyinganything.blogspot.in/2012/10/scary-halloween-spending-turning-us.html

And....

Page 9: Never build a login again - The art of using social Auth using Django

9

And....

People trusts giants and so do we

Page 10: Never build a login again - The art of using social Auth using Django

10

Let's see how to do it

Page 11: Never build a login again - The art of using social Auth using Django

11

Wait...First tell me which backend to use and why??

Page 12: Never build a login again - The art of using social Auth using Django

12

No rules but lots of Common sense

➢ Millions of Users Vs. Targated Clients

➢ Personal Vs. Professional Vs. Social

➢ Web first Vs. Mobile first

Page 13: Never build a login again - The art of using social Auth using Django

13

Let's do it with Django

It takes only 3 steps to integrate Social Authentication with your web project.

For this Demo I am using Twitter as a backend but you can pick backend of your choice.

Page 14: Never build a login again - The art of using social Auth using Django

14

Step - 1

Create an app with your backend

Page 15: Never build a login again - The art of using social Auth using Django

15

Page 16: Never build a login again - The art of using social Auth using Django

16

Page 17: Never build a login again - The art of using social Auth using Django

17

Step - 2

Configure your Django application to use Social Authentication

Page 18: Never build a login again - The art of using social Auth using Django

18More : http://python-social-auth.readthedocs.org/en/latest/index.html

Page 19: Never build a login again - The art of using social Auth using Django

19

Step - 3

In your login.html put

<a id="login" href="{% url 'social:begin' 'twitter' %}?next=/">Login with Twitter</a>

Page 20: Never build a login again - The art of using social Auth using Django

20

Bonus Step

https://github.com/nikunjness/Django-art-of-Oauth

Page 21: Never build a login again - The art of using social Auth using Django

21

Let's see it running....

Page 22: Never build a login again - The art of using social Auth using Django

22

Page 23: Never build a login again - The art of using social Auth using Django

23

Thank you!

Page 24: Never build a login again - The art of using social Auth using Django

24

Resources

Fonts : http://www.awwwards.com/100-greatest-free-fonts-collection.html