Open JakeIwen opened 6 years ago
note for talking about this at meeting: would also like potential instruction on how to use logic in GraphQL data migration for new User field auth0FBId.
How can I do this with ALL users in the database:
if (user.auth0UserId.includes('facebook')) {
user.auth0FBId = user.auth0UserId
}
So re: the data stored in auth0UserId
, I believe that that is all done by Graphql and we don't get a say in it. I believe to remedy this, I made another field that holds facebookId if we don't have it?
Re: the error. You've come across some of the major troubles in authentication. I think you should call me today and I can explain it to you. At the heart of the problem is this: Graph.Cool and Auth0, at the time these files were created, did not automatically reconcile or combine accounts that had the same email address and were essentially duplicates –– but they also handled them differently.
Also re: data migration, I'm afraid I've never done a data migration with GraphQL so I'm not sure that I could be of much help.
No problem about the migration' I'll figure it out.
Maybe we can chat at today's meeting via skype about the auth issues. A walkthruough of the authFlow would be cool, but maybe it would be more beneficial to add comments instead/first.
In the graphQL DB, BT users who signed up with an email address have field
auth0UserId='auth0|17dc6865cd47dc65dc4dsc534
and those who signed up with facebook have something likeauth0UserId=facebook|879066578568512
first of all I am curious about the design intent of not storing the auth0 ID at all for facebook users.
In order to add a separate password, allowing FB users to login with their email, the auth0 ID is required. I was able to manually add a password to my BT-facebook account, but when I log in using my email and newly created password, I end up getting kicked out with this message, despite the the auth0 logs showing a successful login attempt:
This error is meant to occur on the SIGN-IN part of the lock screen, when a user tries to sign up with an existing BT email address. It obviously doesn't make sense to receive this error after pressing the LOGIN button. The console also shows an attempt to create a new user.
This error and the attempt to create an account stem from a rejected signIn mutation (towards the bottom). Can you help identify what the issue is, and how to allow our signIn mutation to work properly in this scenario?
A general explanation of this authFlow would be appreciated as well.