Can anyone Tell me how to get uid/token using flutter firebase phone authentication?

Can anyone Tell me how to get uid/token using flutter firebase phone authentication?

I am able to authenticate but i dont know how to get uid so i can send my fetch and get requests.

1 answer

  • answered 2020-03-25 14:05 Sam Robinson

    Once Authenticated, you are able to get the UID of a user via:

    final FirebaseUser user = await auth.currentUser();
    final uid = user.uid;