You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auth is created as a singleton object. This is because the Module Worker syntax only use environment variables at the time of request.
116
116
117
117
-`projectId` specifies the ID of the project for which firebase auth is used.
118
118
-`keyStore` is used to cache the public key used to validate the Firebase ID token (JWT).
119
+
-`credential` is an optional. This is used to utilize Admin APIs such as `createSessionCookie`. Currently, you can specify `ServiceAccountCredential` class, which allows you to use a service account.
119
120
120
121
See official document for project ID: https://firebase.google.com/docs/projects/learn-more#project-identifiers
121
122
@@ -125,6 +126,7 @@ Verifies a Firebase ID token (JWT). If the token is valid, the promise is fulfil
125
126
126
127
See the [ID Token section of the OpenID Connect spec](http://openid.net/specs/openid-connect-core-1_0.html#IDToken) for more information about the specific properties below.
127
128
129
+
-`idToken` The ID token to verify.
128
130
-`env` is an optional parameter. but this is using to detect should use emulator or not.
Creates a new Firebase session cookie with the specified options. The created JWT string can be set as a server-side session cookie with a custom cookie policy, and be used for session management. The session cookie JWT will have the same payload claims as the provided ID token. See [Manage Session Cookies](https://firebase.google.com/docs/auth/admin/manage-cookies) for code samples and detailed documentation.
146
+
147
+
-`idToken` The Firebase ID token to exchange for a session cookie.
148
+
-`sessionCookieOptions` The session cookie options which includes custom session duration.
149
+
-`env` is an optional parameter. but this is using to detect should use emulator or not.
150
+
151
+
**Required** service acccount credential to use this API. You need to set the credentials with `Auth.getOrInitialize`.
Verifies a Firebase session cookie. Returns a Promise with the cookie claims. Rejects the promise if the cookie could not be verified.
156
+
157
+
See [Verify Session Cookies](https://firebase.google.com/docs/auth/admin/manage-cookies#verify_session_cookie_and_check_permissions) for code samples and detailed documentation.
158
+
159
+
-`sessionCookie` The session cookie to verify.
160
+
-`env` is an optional parameter. but this is using to detect should use emulator or not.
0 commit comments