UserIdentity for linking a logged user
Hi, I'm trying to connect an existing user that's already in the application with their providers. This would be the idea
1. User sign-in with password or magic link
2. We display all supported providers: Github, Google, ...
3. User clicks on one provider and the auth flow starts.
The normal use case for User identity is I think this
1. User sign-in with password or magic link
2. Log out
3. Clicks on sign-in with Github where their email is the same
This is what I have working in this repo
https://github.com/andresgutgon/ash_learning/pull/1
But I think the other use case is super interesting because allows existing users with
The problem I encountered when I dig into this is that auth flow creates the user if it does not exists for that email.
So the app ends with 2 emails
1.
2.
The problem is that I don't know how to hook before the user creation happens.
I think this is not possible with current implementation but let me know
1. User sign-in with password or magic link
2. We display all supported providers: Github, Google, ...
3. User clicks on one provider and the auth flow starts.
The normal use case for User identity is I think this
1. User sign-in with password or magic link
myemail@gmail.com2. Log out
3. Clicks on sign-in with Github where their email is the same
myemail@gmail.comThis is what I have working in this repo
https://github.com/andresgutgon/ash_learning/pull/1
But I think the other use case is super interesting because allows existing users with
someemail@hotmail.com connect their Github which they have linked to a different email myemail@gmail.comThe problem I encountered when I dig into this is that auth flow creates the user if it does not exists for that email.
So the app ends with 2 emails
1.
someemail@gmail.com User sign-in with password2.
myemail@gmail.com User already inside the app is logout and new user is sign-in with this emailThe problem is that I don't know how to hook before the user creation happens.
I think this is not possible with current implementation but let me know

Ash