Credential interface
Stay organized with collections
Save and categorize content based on your preferences.
Interface that provides Google OAuth2 access tokens used to authenticate with Firebase services.
In most cases, you will not need to implement this yourself and can instead use the default implementations provided by the firebase-admin/app
module.
Signature:
export interface Credential
Methods
Method |
Description |
getAccessToken() |
Returns a Google OAuth2 access token object used to authenticate with Firebase services. |
Credential.getAccessToken()
Returns a Google OAuth2 access token object used to authenticate with Firebase services.
Signature:
getAccessToken(): Promise<GoogleOAuthAccessToken>;
Returns:
Promise<GoogleOAuthAccessToken>
A Google OAuth2 access token object.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-29 UTC.
[null,null,["Last updated 2022-07-29 UTC."],[],[],null,["# Credential interface\n\nInterface that provides Google OAuth2 access tokens used to authenticate with Firebase services.\n\nIn most cases, you will not need to implement this yourself and can instead use the default implementations provided by the `firebase-admin/app` module.\n\n**Signature:** \n\n export interface Credential \n\nMethods\n-------\n\n| Method | Description |\n|---------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|\n| [getAccessToken()](./firebase-admin.app.credential.md#credentialgetaccesstoken) | Returns a Google OAuth2 access token object used to authenticate with Firebase services. |\n\nCredential.getAccessToken()\n---------------------------\n\nReturns a Google OAuth2 access token object used to authenticate with Firebase services.\n\n**Signature:** \n\n getAccessToken(): Promise\u003cGoogleOAuthAccessToken\u003e;\n\n**Returns:**\n\nPromise\\\u003c[GoogleOAuthAccessToken](./firebase-admin.app.googleoauthaccesstoken.md#googleoauthaccesstoken_interface)\\\u003e\n\nA Google OAuth2 access token object."]]