question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FirebaseAuth.getInstance().getCurrentUser().getUid() returning numbers in place of actual user id

See original GitHub issue

[REQUIRED] Step 2: Describe your environment

com.google.firebase:firebase-auth:19.2.0

[REQUIRED] Step 3: Describe the problem

Using FirebaseAuth.getInstance().getCurrentUser().getUid() to get the user id of the user. This method is returning numbers instead of the actual user id in some case. Also, we find the users token is still valid but the user id returning from the SDK is of number example: 101528418014522522531

Steps to reproduce:

Sorry, not able to reproduce the issue and was got from Crashlytics for some users

Relevant Code:

 FirebaseAuth.getInstance().getCurrentUser().getUid()

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sam-gccommented, Sep 24, 2020

Okay thanks, I’ll update the tracking bug with that info

0reactions
malcolmdeckcommented, Nov 5, 2020

I’m glad to hear it - I’ll close this issue, then 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

FirebaseAuth.getInstance().getCurrentUser().getUid ... - GitHub
"Using FirebaseAuth.getInstance().getCurrentUser().getUid() to get the user id of the user. This method is returning numbers instead of the ...
Read more >
FirebaseAuth.getInstance().getUid() - How does it work?
Returns a user identifier as specified by the authentication provider. For example, if this object corresponds to a Google user, returns a ...
Read more >
Manage Users in Firebase | Firebase Authentication - Google
Get the currently signed-in user​​ There are some cases where getCurrentUser will return a non-null FirebaseUser but the underlying token is not valid....
Read more >
Why is my currentUser == null in Firebase Auth? - Medium
Auth state seems binary: null or non-null (or is it?)​​ The current user object ends up being null, even if the user previously...
Read more >
Connecting Users and Object Data - LearnHowToProgram.com
To get the currently authorized user, we simply need to get the current instance of the FirebaseAuth object and then call the getCurrentUser()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found