5
Implementing Social Authentication
In the previous chapter, you built user registration and authentication into your website. You implemented password change, reset, and recovery functionalities, and you learned how to create a custom profile model for your users.
In this chapter, you will add social authentication to your site using Google. You will use Python Social Auth for Django to implement social authentication using OAuth 2.0, the industry-standard protocol for authorization. You will also modify the social authentication pipeline to create a user profile for new users automatically.
This chapter will cover the following points:
- Using the messages framework
- Building a custom authentication backend
- Preventing users from using an existing ...
Get Django 5 By Example - Fifth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.