tougenkyou

rubber ducking session - multiple oauth2 login providers

stream-of-consciousness tech

i'm trying to suss out how a sane oauth2 social login flow should look like.

preconditions:

we have a table mapping our provider-specific unique id, to the id / primary key of our own user entity.

provider_key user_id provider_name
10934ABCD14322701XXXX ab99c5ff-16ed-4ea4-a18b-7c78e6f8f93b google

initial signup is via social login

if provider_key is not found;

if provider_key is found:

initial signup is via traditional / email

(dis)connecting additional social accounts