Back to Firebase Js Sdk

OAuthCredentialOptions interface

docs-devsite/auth.oauthcredentialoptions.md

12.12.11.9 KB
Original Source

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

OAuthCredentialOptions interface

Defines the options for initializing an OAuthCredential<!-- -->.

For ID tokens with nonce claim, the raw nonce has to also be provided.

<b>Signature:</b>

typescript
export interface OAuthCredentialOptions 

Properties

PropertyTypeDescription
accessTokenstringThe OAuth access token used to initialize the OAuthCredential<!-- -->.
idTokenstringThe OAuth ID token used to initialize the OAuthCredential<!-- -->.
rawNoncestringThe raw nonce associated with the ID token.

OAuthCredentialOptions.accessToken

The OAuth access token used to initialize the OAuthCredential<!-- -->.

<b>Signature:</b>

typescript
accessToken?: string;

OAuthCredentialOptions.idToken

The OAuth ID token used to initialize the OAuthCredential<!-- -->.

<b>Signature:</b>

typescript
idToken?: string;

OAuthCredentialOptions.rawNonce

The raw nonce associated with the ID token.

It is required when an ID token with a nonce field is provided. The SHA-256 hash of the raw nonce must match the nonce field in the ID token.

<b>Signature:</b>

typescript
rawNonce?: string;