FirebaseAdmin. Auth. FirebaseAuth
This is the entry point to all server-side Firebase Authentication operations.
Summary
You can get an instance of this class viaFirebaseAuth.DefaultInstance.
Inheritance
Inherits from:FirebaseAdmin.Auth.AbstractFirebaseAuthProperties | |
|---|---|
DefaultInstance | staticFirebaseAuthGets the auth instance associated with the default Firebase app. |
Public attributes | |
|---|---|
TenantManager => this.IfNotDeleted(() => this.tenantManager.Value) | Gets theTenantManager instance associated with the current project. |
Public static functions | |
|---|---|
GetAuth(FirebaseApp app) | Returns the auth instance for the specified app. |
Public functions | |
|---|---|
CreateSessionCookieAsync(string idToken,SessionCookieOptions options) | async Task< string >Creates a new Firebase session cookie from the given ID token and options. |
CreateSessionCookieAsync(string idToken,SessionCookieOptions options, CancellationToken cancellationToken) | async Task< string >Creates a new Firebase session cookie from the given ID token and options. |
VerifySessionCookieAsync(string sessionCookie) | async Task<FirebaseToken >Parses and verifies a Firebase session cookie. |
VerifySessionCookieAsync(string sessionCookie, CancellationToken cancellationToken) | async Task<FirebaseToken >Parses and verifies a Firebase session cookie. |
VerifySessionCookieAsync(string sessionCookie, bool checkRevoked) | async Task<FirebaseToken >Parses and verifies a Firebase session cookie. |
VerifySessionCookieAsync(string sessionCookie, bool checkRevoked, CancellationToken cancellationToken) | async Task<FirebaseToken >Parses and verifies a Firebase session cookie. |
Properties
DefaultInstance
staticFirebaseAuth DefaultInstance
Gets the auth instance associated with the default Firebase app.
This property isnull if the default app doesn't yet exist.
Public attributes
TenantManager
TenantManager TenantManager => this.IfNotDeleted(() => this.tenantManager.Value)
Gets theTenantManager instance associated with the current project.
Public static functions
GetAuth
FirebaseAuth GetAuth(FirebaseApp app)
Returns the auth instance for the specified app.
| Details | |||
|---|---|---|---|
| Exceptions |
| ||
| Parameters |
| ||
| Returns | TheFirebaseAuth instance associated with the specified app. |
Public functions
CreateSessionCookieAsync
async Task< string > CreateSessionCookieAsync( string idToken,SessionCookieOptions options)
Creates a new Firebase session cookie from the given ID token and options.
The returned JWT can be set as a server-side session cookie with a custom cookie policy.
| Details | |||||
|---|---|---|---|---|---|
| Exceptions |
| ||||
| Parameters |
| ||||
| Returns | A task that completes with the Firebase session cookie. |
CreateSessionCookieAsync
async Task< string > CreateSessionCookieAsync( string idToken,SessionCookieOptions options, CancellationToken cancellationToken)
Creates a new Firebase session cookie from the given ID token and options.
The returned JWT can be set as a server-side session cookie with a custom cookie policy.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Exceptions |
| ||||||
| Parameters |
| ||||||
| Returns | A task that completes with the Firebase session cookie. |
VerifySessionCookieAsync
async Task<FirebaseToken > VerifySessionCookieAsync( string sessionCookie)
Parses and verifies a Firebase session cookie.
SeeManage Session Cookies for code samples and detailed documentation.
| Details | |||||
|---|---|---|---|---|---|
| Exceptions |
| ||||
| Parameters |
| ||||
| Returns | A task that completes with aFirebaseToken representing the verified and decoded session cookie. |
VerifySessionCookieAsync
async Task<FirebaseToken > VerifySessionCookieAsync( string sessionCookie, CancellationToken cancellationToken)
Parses and verifies a Firebase session cookie.
SeeManage Session Cookies for code samples and detailed documentation.
| Details | |||||
|---|---|---|---|---|---|
| Exceptions |
| ||||
| Parameters |
| ||||
| Returns | A task that completes with aFirebaseToken representing the verified and decoded session cookie. |
VerifySessionCookieAsync
async Task<FirebaseToken > VerifySessionCookieAsync( string sessionCookie, bool checkRevoked)
Parses and verifies a Firebase session cookie.
SeeManage Session Cookies for code samples and detailed documentation.
| Details | |||||
|---|---|---|---|---|---|
| Exceptions |
| ||||
| Parameters |
| ||||
| Returns | A task that completes with aFirebaseToken representing the verified and decoded session cookie. |
VerifySessionCookieAsync
async Task<FirebaseToken > VerifySessionCookieAsync( string sessionCookie, bool checkRevoked, CancellationToken cancellationToken)
Parses and verifies a Firebase session cookie.
SeeManage Session Cookies for code samples and detailed documentation.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Exceptions |
| ||||||
| Parameters |
| ||||||
| Returns | A task that completes with aFirebaseToken representing the verified and decoded session cookie. |
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-03-24 UTC.