Skip to content

Fix AuthError incoherent structure. #5600

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

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
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
19 changes: 15 additions & 4 deletions packages/auth/src/model/public_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ export interface ParsedToken {
export type NextOrObserver<T> = NextFn<T | null> | Observer<T | null>;

/**
* Interface for an `Auth` error.
*
* customData for AuthError
*
* @public
*/
export interface AuthError extends FirebaseError {
export declare interface AuthErrorData
extends Record<string, string | undefined> {
/** The name of the Firebase App which triggered this error. */
readonly appName: string;
/** The email of the user's account, used for sign-in/linking. */
Expand All @@ -135,7 +136,17 @@ export interface AuthError extends FirebaseError {
* you have to set the tenant ID on {@link Auth} instance again as the tenant ID is not persisted
* after redirection.
*/
readonly tenantid?: string;
readonly tenantId?: string; // other tenantId are formatted like this. And It's better than smallcase since ID is a "word"
}

/**
* Interface for an `Auth` error.
*
* @public
*/
export declare interface AuthError extends FirebaseError {
/** The detailed Data of the Firebase Auth error. */
readonly customData: AuthErrorData;
}

/**
Expand Down