Process Flow of Authentication and Authorization using OAuth 2.0 Protocol :
Fig: Process flow of Authentication through Google using OAuth 2.0
The whole process flow described above involves four steps. Firstly, the OAuth 2.0 credentials like client ID and client secret are obtained from the provide(Google Developers Console in this case) for the web application. Now, to access any API, one needs to get the access token from the provider using the set of client ID and client Secret . After the user login, the user is asked whether they are willing to grant the permissions that the application is requesting. This process is called user consent. If the user grants the permission, the provider Authorization Server sends the application an access token (or an authorization code that the application can use to obtain an access token). After the application obtains an access token, it sends the token to the Provider API in an HTTP authorization header. Access tokens have limited lifetimes. If the application needs access to provider's API beyond the lifetime of a single access token, it can obtain a refresh token. A refresh token allows an application to obtain new access tokens.
This is the whole workflow of the authorization using OAuth 2.0 protocol.
This is the whole workflow of the authorization using OAuth 2.0 protocol.
Majorly three django packages are used for integrating social authentication. Below, they are described briefly:
Django-allauth:
It is an integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication. In simple terms, it is a combination of simple login and registration along with social authentication system.
Django-Allauth is the most popular Django package used for Authentication purposes. Best thing about it is that it is available as open source which speeds up the development process due to collaborations with the developers all around the world.
Advantages of Django-allauth:
- Support for Python 2.6, 2.7 and 3.3
- Support for Django Version 1.4.3 and above.
- Supports Social authentication through Dropbox and google using OAuth2.0
- Supports multiple authentication schemes (e.g. login by user name, or by e-mail)
- Multiple strategies for account verification (ranging from none to e-mail verification)
- Support to connect multiple social accounts to a Django user account.
- Consumer keys, tokens make use of the Django sites framework. This is especially helpful for larger multi-domain projects, but also allows for for easy switching between a development (localhost) and production setup without interfering with your settings and database.
- Rapidly gaining traction and improving day by day.
- FAQ page solves most of the problems related to Django-allauth. Otherwise most problems are solved on StackOverflow under the tag #django-allauth. Also mailing list is also available to solve further issues if any.
- It is well tested than other Django authentication packages; credits to consistent development work going on.
- The installation, configuration is easy to get started with.
- Pre-defined templates are available. Its upto the developer whether he wants to customize them or not.
- Also, one can easily add the new backends if required.
Disadvantages of django-allauth:
- While working on it and researching more about it, I found that it has some documentation gaps that need to be fixed.
- It can get problematic for beginners since it involves series of small but time-consuming hurdles.
Django Social Auth:
Django Social-auth library is a Django package that was made for the social authentication. But the library is deprecated now and has migrated to Python-social-auth for providing better support to several frameworks and ORMs.
Advantages of Django-Social-Auth:
- Provides social authentication using OAuth and OpenId mechanism
- Support for Django, Flask, Pyramid, Webpy frameworks.
Disadvantages of Django-Social-auth:
- This package is deprecated.
- No support for Python 3.x
- Development on its codebase has stopped.
- Not well documented. It lacks FAQ page for bug fixing.
Python-Social-Auth:
Python social-auth is easy-to-setup authentication system that provides vast support. It supports several frameworks and auth providers. It has migrated from django-social-auth to generalize the package to provide a vast support and implement a common interface to define new authentication providers from third-parties and bring support for more frameworks and ORMs.
Advantages of Python-Social-auth:
- Provides support for frameworks such as Django, Flask, Webpy, Pyramid and Tornado.
- Supports Python 3.x
- Supports social authentication through Dropbox, Google, etc. using OAuth 2.0
- Frameworks API is provided that ease the implementation to increase the number of frameworks supported.
- Storage API is provided to add support to more ORMs.
- Multiple social accounts can be associated to a single user.
- Basic user data population, to allow custom fields values from providers response.
Disadvantages of Python Social-Auth:
- Not well documented.
- Newer package. So, we cannot predict the future developments.
- Lot of issues(98 issues) are listed on Github.
Comparison between the three authentication packages:
Features
|
Django-Allauth
|
Django-Social-auth
|
Python-Social-auth
|
Commits on Codebase
|
Regular and fast- developing
|
No commits made since 6 months.
|
Regular commits on codebase
|
Python 3.x Support
|
YES
|
NO
|
YES
|
Authentication
|
Simple authentication +
Social authentication |
Only
Social authentication |
Only
Social authentication |
Predefined and customizable
Templates |
YES
|
NO
|
NO
|
Framework Support
|
Django
|
Django, Flask, Webpy, Pyramid and Tornado
|
Django, Flask, Webpy, Pyramid and Tornado
|
Total Commits
|
1072
|
1611
|
1384
|
Development Status
|
Beta
|
Beta
|
Beta
|
OAuth 2.0 Support
|
YES
|
YES
|
YES
|
Current Stable Version
|
0.19.1
|
0.7.28
|
0.2.2
|
Support for Dropbox and Google
|
YES
|
YES
|
YES
|
Repository Forks
|
545
|
735
|
458
|
Total no. of Contributors
|
150
|
167
|
148
|
Repo. watchers
|
1650
|
2169
|
1502
|
Selecting the Appropriate Package:
The package which does not affects the scalability of the project must be given more weightage among all other packages.
From previous work experience and research on authentication libraries, Django-Allauth turns out to be the most appropriate choice of them all. So. in my view, django-allauth should be used for integration.
Very nice article
ReplyDeleteGreat! Very helpful research!
ReplyDeletegreat thanks :)
ReplyDeletenice blog on python. python training in Chennai
ReplyDeletenice blogs about financial accounting at The Basic Financial training in bangalore
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteNice to Read your Blog, Waiting for your Next Update!
ReplyDeleteJava Training in Chennai
Python Training in Chennai
IOT Training in Chennai
Selenium Training in Chennai
Data Science Training in Chennai
FSD Training in Chennai
MEAN Stack Training in Chennai
Great article.THanks to share lots of information.
ReplyDeleteoneplus service center chennai
oneplus service center in chennai
oneplus service centre chennai
oneplus service centre
oneplus mobile service center in chennai
Thanks man!
ReplyDeleteAppreciate your work.
I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
ReplyDeleteData science Course Training in Chennai |Best Data Science Training Institute in Chennai
RPA Course Training in Chennai |Best RPA Training Institute in Chennai
AWS Course Training in Chennai |Best AWS Training Institute in Chennai
Devops Course Training in Chennai |Best Devops Training Institute in Chennai
Selenium Course Training in Chennai |Best Selenium Training Institute in Chennai
Java Course Training in Chennai | Best Java Training Institute in Chennai
sharepoint training in Chennai | sharepoint Training Institute in Chennai
Good post!Thank you so much for sharing this pretty post,it was so good to read and useful to improve my knowledge as updated one,keep blogging.
ReplyDeletePython training in Electronic City
I wish to show thanks to you just for bailing me out of this particular trouble.As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.
ReplyDeleteBest PHP Training Institute in Chennai|PHP Course in chennai
Best .Net Training Institute in Chennai
Dotnet Training in Chennai
Dotnet Training in Chennai
Thanks for sharing,i learnt new things which made me to improve my knowledge.IT employees say that there is no coding experience required to become Data Scientist.If you are the one with no coding background, would suggest you to take Best Data Science Certification Course in Bangalore
ReplyDeleteThanks for sharing your knowledge's,your works are very accuracy.Here Best Python Training in Chennai With Placements
ReplyDeletepython training in chennai | python training in annanagar | python training in omr | python training in porur | python training in tambaram | python training in velachery
Thankyou for the valuable content.It was really helpful in understanding the concept50 High Quality for just 50 INR
ReplyDelete2000 Backlink at cheapest
5000 Backlink at cheapest
Boost DA upto 15+ at cheapest
Boost DA upto 25+ at cheapest
Boost DA upto 35+ at cheapest
Boost DA upto 45+ at cheapest
Are you looking to master the hottest Python programming language? You're in the right place. AI Patasala offers the top Python training in Hyderabad and guides you in the best way to progress and improve your career.
ReplyDeleteOnline Python Course in Hyderabad
ReplyDeleteNice blog! Thanks for sharing this valuable information
RPA Training in Bangalore
RPA Training in Pune
This post is so interactive and informative.keep update more information...
ReplyDeletegraphic design courses in tambaram
graphic design courses in Chennai
This comment has been removed by the author.
ReplyDeleteThis post is so useful and informative. Keep updating with more information.....
ReplyDeleteJava Developer Job Duties
New Java Technologies
perde modelleri
ReplyDeleteNUMARA ONAY
mobil ödeme bozdurma
Nft Nasıl Alınır
Ankara evden eve nakliyat
trafik sigortası
Dedektor
KURMA WEB SİTESİ
ASK ROMANLARİ
en son çıkan perde modelleri
ReplyDeleteen son çıkan perde modelleri
minecraft premium
uc satın al
lisans satın al
yurtdışı kargo
özel ambulans
nft nasıl alınır
Ground later bar yet shoulder. Top type attorney night determine necessary choice.
ReplyDeleteAvailable help body pretty. See population attention call case network magazine.<a href="htt
ReplyDelete