Home > @firebase/auth > Auth > onIdTokenChanged
Auth.onIdTokenChanged() method
Adds an observer for changes to the signed-in user's ID token.
Signature:
onIdTokenChanged(nextOrObserver: NextOrObserver<User | null>, error?: ErrorFn, completed?: CompleteFn): Unsubscribe;
Parameters
Parameter | Type | Description |
---|---|---|
nextOrObserver | NextOrObserver<User | null> | callback triggered on change. |
error | ErrorFn | callback triggered on error. |
completed | CompleteFn | callback triggered when observer is removed. |
Returns:
Unsubscribe
Description
This includes sign-in, sign-out, and token refresh events.