FirebaseAdmin. Auth. FirebaseAuth
This is the entry point to all server-side Firebase Authentication operations.
Summary
You can get an instance of this class via FirebaseAuth.DefaultInstance
.
Inheritance
Inherits from: FirebaseAdmin.Auth.AbstractFirebaseAuth
Properties |
|
---|---|
DefaultInstance
|
static FirebaseAuth
Gets the auth instance associated with the default Firebase app.
|
Public attributes |
|
---|---|
TenantManager => this.IfNotDeleted(() => this.tenantManager.Value)
|
Gets the TenantManager 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
static FirebaseAuth DefaultInstance
Gets the auth instance associated with the default Firebase app.
This property is null
if the default app doesn't yet exist.
Public attributes
TenantManager
TenantManager TenantManager => this.IfNotDeleted(() => this.tenantManager.Value)
Gets the TenantManager 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 |
The FirebaseAuth 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.
See Manage Session Cookies for code samples and detailed documentation.
Details | |||||
---|---|---|---|---|---|
Exceptions |
|
||||
Parameters |
|
||||
Returns |
A task that completes with a FirebaseToken representing the verified and decoded session cookie.
|
VerifySessionCookieAsync
async Task< FirebaseToken > VerifySessionCookieAsync( string sessionCookie, CancellationToken cancellationToken )
Parses and verifies a Firebase session cookie.
See Manage Session Cookies for code samples and detailed documentation.
Details | |||||
---|---|---|---|---|---|
Exceptions |
|
||||
Parameters |
|
||||
Returns |
A task that completes with a FirebaseToken representing the verified and decoded session cookie.
|
VerifySessionCookieAsync
async Task< FirebaseToken > VerifySessionCookieAsync( string sessionCookie, bool checkRevoked )
Parses and verifies a Firebase session cookie.
See Manage Session Cookies for code samples and detailed documentation.
Details | |||||
---|---|---|---|---|---|
Exceptions |
|
||||
Parameters |
|
||||
Returns |
A task that completes with a FirebaseToken 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.
See Manage Session Cookies for code samples and detailed documentation.
Details | |||||||
---|---|---|---|---|---|---|---|
Exceptions |
|
||||||
Parameters |
|
||||||
Returns |
A task that completes with a FirebaseToken representing the verified and decoded session cookie.
|