Skip to content

Commit

Permalink
fix(auth, types): add OIDCProvider to typescript declaration (#6936)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrostorp committed Feb 25, 2023
1 parent 8c57bbb commit 00185a3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/auth/lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,24 @@ export namespace FirebaseAuthTypes {
credential: (token: string | null, secret?: string) => AuthCredential;
}

/**
* Interface that represents an Open ID Connect auth provider. Implemented by other providers.
*/
export interface OIDCProvider {
/**
* The provider ID of the provider.
*/
PROVIDER_ID: string;
/**
* Creates a new `OIDCProvider`.
*
* @returns {@link auth.AuthCredential}.
* @param oidcSuffix this is the "Provider ID" value from the firebase console fx `azure_test`.
* @param token A provider token.
*/
credential: (oidcSuffix: string, idToken: string) => AuthCredential;
}

/**
* Email and password auth provider implementation.
*/
Expand Down Expand Up @@ -298,6 +316,16 @@ export namespace FirebaseAuthTypes {
* ```
*/
OAuthProvider: AuthProvider;
/**
* Custom Open ID connect auth provider implementation.
*
* #### Example
*
* ```js
* firebase.auth.OIDCAuthProvider;
* ```
*/
OIDCAuthProvider: OIDCProvider;
/**
* A PhoneAuthState interface.
*
Expand Down

1 comment on commit 00185a3

@vercel
Copy link

@vercel vercel bot commented on 00185a3 Feb 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.