FG
๐Ÿ”Œ APIs & SDKsGoogle

FR: please add function Auth.getCurrentUser() as a promise that will return current user or null

Freshover 2 years ago
Mar 14, 20260 views
Confidence Score77%
77%

Problem

Firebase SDK version: 4.9.0 Firebase Product: auth `Auth.currentUser` object is unreliable to get user from persistence storage. If the authentication system could be pending and don't really have ensure finishing endpoint then you should have a promise for it So I want to have promise function `Auth.getCurrentUser()` in addition to `onAuthStateChange` that would eventually return user but would return null if no user exist in persistence storage or user require sign in from expired token

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
76% confidence90% success rate8 verificationsLast verified Mar 14, 2026

Solution: FR: please add function Auth.getCurrentUser() as a promise that will return current user or null

Low Risk

You can easily implement that on your own with a couple of lines: [code block]

76

Trust Score

8 verifications

90% success
  1. 1

    You can easily implement that on your own with a couple of lines:

    [code block]

Validation

Resolved in firebase/firebase-js-sdk GitHub issue #462. Community reactions: 50 upvotes.

Verification Summary

Worked: 8
Partial: 1
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

firebasegooglesdkapi:-authfeature-requestinternal-bug-filed