wagnerdelima/drf-social-oauth2

Problem with existing email

Opened this issue · 0 comments

Hello,

I found a problem with signing up by email that is already used.
For example someone login in and sign up throughout normal password based. Then he tries to login using google gmail account since its the same email we used.

This behavior throws error 500 with duplicate key (handling in convert-token view).
Of course I can modify library by myself but every time i go and rebuild my docker container the package is rebuild.

Is there anyway you can add some kind of exception that when the email already exists then view returns not 500 but for example 403 already exists with appropriate message email:backend-type so on the frontend side we can catch it and returns that to user.

Of course i would be very happy to collaborate on that if you are lacking time ;)

Thanks very much in advance