Skip to content

Mark Auth error callbacks as deprecated #6262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions packages/auth/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,17 @@ export function setPersistence(
return getModularInstance(auth).setPersistence(persistence);
}
/**
* Adds an observer for changes to the signed-in user's ID token, which includes sign-in,
* sign-out, and token refresh events.
* Adds an observer for changes to the signed-in user's ID token.
*
* @remarks
* This includes sign-in, sign-out, and token refresh events.
*
* @param auth - The {@link Auth} instance.
* @param nextOrObserver - callback triggered on change.
* @param error - callback triggered on error.
* @param completed - callback triggered when observer is removed.
* @param error - Deprecated. This callback is never triggered. Errors
* on signing in/out can be caught in promises returned from
* sign-in/sign-out functions.
* @param completed - Deprecated. This callback is never triggered.
*
* @public
*/
Expand Down Expand Up @@ -111,8 +115,10 @@ export function onIdTokenChanged(
*
* @param auth - The {@link Auth} instance.
* @param nextOrObserver - callback triggered on change.
* @param error - callback triggered on error.
* @param completed - callback triggered when observer is removed.
* @param error - Deprecated. This callback is never triggered. Errors
* on signing in/out can be caught in promises returned from
* sign-in/sign-out functions.
* @param completed - Deprecated. This callback is never triggered.
*
* @public
*/
Expand Down
12 changes: 8 additions & 4 deletions packages/auth/src/model/public_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,10 @@ export interface Auth {
* To keep the old behavior, see {@link Auth.onIdTokenChanged}.
*
* @param nextOrObserver - callback triggered on change.
* @param error - callback triggered on error.
* @param completed - callback triggered when observer is removed.
* @param error - Deprecated. This callback is never triggered. Errors
* on signing in/out can be caught in promises returned from
* sign-in/sign-out functions.
* @param completed - Deprecated. This callback is never triggered.
*/
onAuthStateChanged(
nextOrObserver: NextOrObserver<User | null>,
Expand All @@ -274,8 +276,10 @@ export interface Auth {
* This includes sign-in, sign-out, and token refresh events.
*
* @param nextOrObserver - callback triggered on change.
* @param error - callback triggered on error.
* @param completed - callback triggered when observer is removed.
* @param error - Deprecated. This callback is never triggered. Errors
* on signing in/out can be caught in promises returned from
* sign-in/sign-out functions.
* @param completed - Deprecated. This callback is never triggered.
*/
onIdTokenChanged(
nextOrObserver: NextOrObserver<User | null>,
Expand Down