If we point a browser to the /dashboard/ path for our project domain (for example, http://myproject.local/dashboard/), we will be required to log in first, as a result of applying the login_required decorator to the class-based Dashboard view in the urls.py project. A series of redirects by the authentication system will bring us to an Auth0 login screen similar to the following:
This much is enabled out of the box by Django—the integration of the social_django app, and configuration of its associated SOCIAL_AUTH_* settings.
Once a successful login is completed, the Auth0 backend receives the data from the response and processes it. The associated data is attached to the user object associated with the request. In the dashboard view, reached as a result of authentication proceeding to LOGIN_REDIRECT_URL, user details are extracted and added to the template context. dashboard.html is then rendered, and the result might appear as something like this:
The logout button presented on the dashboard will proceed to log the user back out, ultimately taking them to the configured LOGOUT_REDIRECT_URL.