In such case that user email is unique and normal user registering is available: If a user tries to social sign-in with a registered email, it will end up with db error saying the email is already exists!
For example assume this scenario:
1- user register normally (using normal register form) with his/her gmail.
2- the user tries to login by google with the same gmail address.
as I mentioned above, convert-token request will response with 500 error because of db error.
I fixed this problem by catching this error in oauth2_grants file (SocialTokenGrant.validate_token_request method).
In such case that user email is unique and normal user registering is available: If a user tries to social sign-in with a registered email, it will end up with db error saying the email is already exists! For example assume this scenario: 1- user register normally (using normal register form) with his/her gmail. 2- the user tries to login by google with the same gmail address. as I mentioned above,
convert-token
request will response with 500 error because of db error. I fixed this problem by catching this error inoauth2_grants
file (SocialTokenGrant.validate_token_request
method).