Skip to content

Commit 00185a3

Browse files
authored
fix(auth, types): add OIDCProvider to typescript declaration (#6936)
1 parent 8c57bbb commit 00185a3

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

packages/auth/lib/index.d.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,24 @@ export namespace FirebaseAuthTypes {
109109
credential: (token: string | null, secret?: string) => AuthCredential;
110110
}
111111

112+
/**
113+
* Interface that represents an Open ID Connect auth provider. Implemented by other providers.
114+
*/
115+
export interface OIDCProvider {
116+
/**
117+
* The provider ID of the provider.
118+
*/
119+
PROVIDER_ID: string;
120+
/**
121+
* Creates a new `OIDCProvider`.
122+
*
123+
* @returns {@link auth.AuthCredential}.
124+
* @param oidcSuffix this is the "Provider ID" value from the firebase console fx `azure_test`.
125+
* @param token A provider token.
126+
*/
127+
credential: (oidcSuffix: string, idToken: string) => AuthCredential;
128+
}
129+
112130
/**
113131
* Email and password auth provider implementation.
114132
*/
@@ -298,6 +316,16 @@ export namespace FirebaseAuthTypes {
298316
* ```
299317
*/
300318
OAuthProvider: AuthProvider;
319+
/**
320+
* Custom Open ID connect auth provider implementation.
321+
*
322+
* #### Example
323+
*
324+
* ```js
325+
* firebase.auth.OIDCAuthProvider;
326+
* ```
327+
*/
328+
OIDCAuthProvider: OIDCProvider;
301329
/**
302330
* A PhoneAuthState interface.
303331
*

0 commit comments

Comments
 (0)