0
votes

I have been using Firebase Phone Authentication for my Expo react-native project and now I am trying to access authenticated user data like phone no from access-token.

Can anyone please suggest me how to access user object from the access-token returned by

firebase.auth().signInWithCredential(credential);

Any help or suggestion would be much appreciated. Thank you in advance!

1

1 Answers

0
votes

Please reference to these links:

https://firebase.google.com/docs/reference/js/firebase.auth.Auth#signinwithcredential

https://firebase.google.com/docs/reference/js/firebase.auth#usercredential

Example:

const user = await firebase.auth().signInWithCredential(credential);
console.log(user.additionalUserInfo);