Hey! I am looking for a solution where users can l...
# prisma-whats-new
c
Hey! I am looking for a solution where users can login with any auth0 connection and have the same account in Graph.cool. I have the user accounts being merged in Auth0 if they have the same email, but when a request with the Auth0 Result's Token to my Graph.cool endpoint, the Graph.cool API doesn't recognize that there is a user that already exists and creates a new user. This leaves the previous user's account (and their data) inaccessible by that user because all subsequent logins to Auth0 return the token associated with the most recent User from Graph.cool. I am not sure if anyone else has encountered this problem. One solution would be to do some Merge User operation, but not sure if there is something easier.
n
@cartogram I am not sure how Auth0 handles these situations, but we refer to the id token obtained from Auth0. Whichever auth0UserId it encodes determines the user we correspond it with. Do you know if you can control this by configuring Auth0's settings or by stepping in before the token is generated?
c
Hey Nilan, Thanks for your response, I think I figure it out by reversing which account is treated as the primary when the account linking process happens in Auth0. This maintains the same auth0 user id and plays well with Graph cool.
n
Yea I thought something along those lines will work. If you figured it out it would be great to share it here: https://github.com/graphcool/feature-requests/issues/50