Skip to content

Commit 40ca4b5

Browse files
committed
Update documentation
1 parent f46d09d commit 40ca4b5

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docs-devsite/auth.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Firebase Authentication
2828
| [confirmPasswordReset(auth, oobCode, newPassword)](./auth.md#confirmpasswordreset_749dad8) | Completes the password reset process, given a confirmation code and new password. |
2929
| [connectAuthEmulator(auth, url, options)](./auth.md#connectauthemulator_657c7e5) | Changes the [Auth](./auth.auth.md#auth_interface) instance to communicate with the Firebase Auth Emulator, instead of production Firebase Auth services. |
3030
| [createUserWithEmailAndPassword(auth, email, password)](./auth.md#createuserwithemailandpassword_21ad33b) | Creates a new user account associated with the specified email address and password. |
31-
| [exchangeToken(auth, idpConfigId, customToken)](./auth.md#exchangetoken_b6b1871) | |
31+
| [exchangeToken(auth, idpConfigId, customToken)](./auth.md#exchangetoken_b6b1871) | Asynchronously exchanges an OIDC provider's Authorization code or Id Token for an OidcToken i.e. Outbound Access Token. |
3232
| [fetchSignInMethodsForEmail(auth, email)](./auth.md#fetchsigninmethodsforemail_efb3887) | Gets the list of possible sign in methods for the given email address. This method returns an empty list when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, irrespective of the number of authentication methods available for the given email. |
3333
| [getMultiFactorResolver(auth, error)](./auth.md#getmultifactorresolver_201ba61) | Provides a [MultiFactorResolver](./auth.multifactorresolver.md#multifactorresolver_interface) suitable for completion of a multi-factor flow. |
3434
| [getRedirectResult(auth, resolver)](./auth.md#getredirectresult_c35dc1f) | Returns a [UserCredential](./auth.usercredential.md#usercredential_interface) from the redirect-based sign-in flow. |
@@ -408,6 +408,12 @@ Promise&lt;[UserCredential](./auth.usercredential.md#usercredential_interface)<!
408408

409409
### exchangeToken(auth, idpConfigId, customToken) {:#exchangetoken_b6b1871}
410410

411+
Asynchronously exchanges an OIDC provider's Authorization code or Id Token for an OidcToken i.e. Outbound Access Token.
412+
413+
This method is imeplemented only for and requires [TenantConfig](./auth.tenantconfig.md#tenantconfig_interface) to be configured in the [Auth](./auth.auth.md#auth_interface) instance used.
414+
415+
Fails with an error if the token is invalid, expired, or not accepted by the Firebase Auth service.
416+
411417
<b>Signature:</b>
412418

413419
```typescript
@@ -418,14 +424,16 @@ export declare function exchangeToken(auth: Auth, idpConfigId: string, customTok
418424

419425
| Parameter | Type | Description |
420426
| --- | --- | --- |
421-
| auth | [Auth](./auth.auth.md#auth_interface) | |
422-
| idpConfigId | string | |
423-
| customToken | string | |
427+
| auth | [Auth](./auth.auth.md#auth_interface) | The [Auth](./auth.auth.md#auth_interface) instance. |
428+
| idpConfigId | string | The ExternalUserDirectoryId corresponding to the OIDC custom Token. |
429+
| customToken | string | The OIDC provider's Authorization code or Id Token to exchange. |
424430

425431
<b>Returns:</b>
426432

427433
Promise&lt;string&gt;
428434

435+
The firebase access token (JWT signed by Firebase Auth).
436+
429437
### fetchSignInMethodsForEmail(auth, email) {:#fetchsigninmethodsforemail_efb3887}
430438

431439
Gets the list of possible sign in methods for the given email address. This method returns an empty list when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, irrespective of the number of authentication methods available for the given email.

0 commit comments

Comments
 (0)