This PR fixes the OAuth authentication issue in the Django project. Users were unable to properly authenticate and login using OAuth providers like Facebook and Google. The issue was caused by incorrect OAuth credentials, misconfigured drf_social_oauth2 middleware, and missing CSRF settings.
Summary of Changes
Updated the OAuth credentials for Facebook and Google in the settings.py file.
Reviewed and corrected the drf_social_oauth2 middleware setup in the settings.py file.
Updated the CSRF settings and added csrf_exempt configuration for OAuth2CallbackView in the settings.py file.
Whitelisted the app domains/origins in the ALLOWED_HOSTS and CSRF_TRUSTED_ORIGINS variables in the settings.py file.
Please review and merge this PR to fix the OAuth authentication issue.
Fixes #6.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/fix-oauth-authentication_1
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.
Description
This PR fixes the OAuth authentication issue in the Django project. Users were unable to properly authenticate and login using OAuth providers like Facebook and Google. The issue was caused by incorrect OAuth credentials, misconfigured
drf_social_oauth2
middleware, and missing CSRF settings.Summary of Changes
settings.py
file.drf_social_oauth2
middleware setup in thesettings.py
file.csrf_exempt
configuration forOAuth2CallbackView
in thesettings.py
file.ALLOWED_HOSTS
andCSRF_TRUSTED_ORIGINS
variables in thesettings.py
file.Please review and merge this PR to fix the OAuth authentication issue.
Fixes #6.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.