Open redex-ai opened 11 months ago
To add Google authentication, we need to install the 'social-auth-app-django' package, configure the authentication backends in Django settings, add the necessary URLs, create a view and template for the home page that requires Google authentication, and create a login page with Google sign-in.
Add 'social-auth-app-django' to the list of requirements to handle OAuth authentication with Google.
Add 'social_django' to the INSTALLED_APPS list and configure authentication backends to include Google OAuth. Also, add the Google OAuth credentials and define the LOGIN_URL, LOGIN_REDIRECT_URL, and LOGOUT_REDIRECT_URL.
Include the URLs for social authentication provided by 'social_django'.
Create a new view to handle the home page request which checks if a user is authenticated with Google before allowing access.
Create a new HTML template for the home page if it does not exist. If it exists, ensure it has the necessary context to display user information.
Create a new HTML template for the login page with a button to authenticate via Google.
PULL REQUEST : https://github.com/redex-ai/django-notes-app/pull/18
Add google auth to see home page