Skip to content

Commit

Permalink
Fix google validation id_token (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
shinecoding authored Jul 17, 2023
1 parent 400e106 commit 8b7fc85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dj_rest_auth/registration/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def validate(self, attrs):

try:
if adapter.provider_id == 'google' and not code:
login = self.get_social_login(adapter, app, social_token, response={'id_token': token})
login = self.get_social_login(adapter, app, social_token, response={'id_token': id_token})
else:
login = self.get_social_login(adapter, app, social_token, token)
ret = complete_social_login(request, login)
Expand Down

1 comment on commit 8b7fc85

@sczesla
Copy link

@sczesla sczesla commented on 8b7fc85 Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 157 is only executed if an access token is given, which corresponds to "Case 1" above. In that case, however, token is a string holding the access token and id_token is usually empty. Is this the correct behavior? It appears to me that the previous form was correct.

Please sign in to comment.