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
This caches the public key used to verify the Firebase ID token in the [Workers KV](https://developers.cloudflare.com/workers/runtime-apis/kv/).
134
+
Verifies a Firebase session cookie. Returns a Promise with the cookie claims. Rejects the promise if the cookie could not be verified.
137
135
138
-
This is implemented `KeyStorer` interface.
136
+
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.
139
137
140
-
-`cacheKey` specifies the key of the public key cache.
141
-
-`cfKVNamespace` specifies the KV namespace which is bound your workers.
138
+
-`sessionCookie` The session cookie to verify.
139
+
-`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
144
@@ -150,14 +148,24 @@ Creates a new Firebase session cookie with the specified options. The created JW
150
148
151
149
**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.
153
+
WorkersKVStoreSingle is created as a singleton object. This is because the Module Worker syntax only use environment variables at the time of request.
156
154
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.
155
+
This caches the public key used to verify the Firebase ID token in the [Workers KV](https://developers.cloudflare.com/workers/runtime-apis/kv/).
158
156
159
-
-`sessionCookie` The session cookie to verify.
160
-
-`env` is an optional parameter. but this is using to detect should use emulator or not.
157
+
This is implemented `KeyStorer` interface.
158
+
159
+
-`cacheKey` specifies the key of the public key cache.
160
+
-`cfKVNamespace` specifies the KV namespace which is bound your workers.
AdminAuthApiClient is created as a singleton object. This is because the Module Worker syntax only use environment variables at the time of request.
165
+
166
+
You can send request with the [Admin Auth API](https://cloud.google.com/identity-platform/docs/reference/rest). To generate an access token, you will use the `Credential` class. For instance, if you want to generate an access token from a Service Account JSON, you need to specify `ServiceAccountCredential` as a parameter during initialization.
167
+
168
+
By specifying the [`roles/firebaseauth.admin`](https://firebase.google.com/docs/projects/iam/roles-predefined-product#app-distro) role to the Service Account, it becomes available for use. If you want finer control over permissions, create a Custom Role based on the [Access Control](https://cloud.google.com/identity-platform/docs/access-control) guide and assign it to the Service Account.
0 commit comments