If you sign in with a custom token in Firebase, you'll notice that the identifier field of a user is left blank.
You can change the identifier field using updateEmail()
function.
Example:
javascriptlet { user, additionalUserInfo } = await firebase.auth().signInWithCustomToken(token); await user.updateEmail('jeff.bezos@amazon.com');
Now Jeff Bezos will have a User UID (UUID) generated by signInWithCustomToken()
function and an email as identifier.
Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.