This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
givenName
andfamilyName
variables togiven_name
andfamily_name
to ensureprofile_data
is properly obtained fromuser_data
as the user info endpoint (https://www.googleapis.com/oauth2/v3/userinfo)returnsgiven_name
andfamily_name
instead of the former.app_name
variable inapi/urls.py
helps preventNoReverseMatchError
in GoogleLoginApi while reverse function to get api_uri from urls namespaces. This can also be fixed by replacing the second url pattern inconfig/urls.py
withpath('api/', include(('api.urls', 'api'), namespace='api')),
redirect_uri mismatch
errors can easily arise from trailing slashes being the subtle difference between the authorized redirect URIs in the Google console and theredirect_uri
value used in the codebase. A quick warning on this can save someone hours of debugging.REQUIRED_FIELDS
inusers/models.py
helps to prevent a TypeError from a missing required positional argument (username
) in the create_superuser function in theUserManager
. This makes it possible to create superusers for testing purposesissued_at’ as the fourth argument of
jwt_response_payload_handlerto fix
TypeError` as a result of excessive arguments (4) coming from https://github.com/Styria-Digital/django-rest-framework-jwt/blob/master/src/rest_framework_jwt/views.py#L34 instead of expected three(3) arguments of the function. This error prevents the traditional email-password login flow from happening successfully.