Skip to content

Commit 4380253

Browse files
committed
updated examples
1 parent fa02696 commit 4380253

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

example/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ app.get('/admin/login', async c => {
7272
<script type="module">
7373
// See https://firebase.google.com/docs/auth/admin/manage-cookies
7474
//
75-
import { initializeApp } from 'https://www.gstatic.com/firebasejs/10.5.0/firebase-app.js';
75+
import { initializeApp } from 'https://www.gstatic.com/firebasejs/11.0.2/firebase-app.js';
7676
import $ from 'https://cdn.skypack.dev/jquery';
7777
// Add Firebase products that you want to use
7878
import {
@@ -83,7 +83,7 @@ app.get('/admin/login', async c => {
8383
signOut,
8484
setPersistence,
8585
inMemoryPersistence,
86-
} from 'https://www.gstatic.com/firebasejs/10.5.0/firebase-auth.js';
86+
} from 'https://www.gstatic.com/firebasejs/11.0.2/firebase-auth.js';
8787
const app = initializeApp({
8888
apiKey: 'test1234',
8989
authDomain: 'test',
@@ -151,7 +151,7 @@ app.post('/admin/login_session', async c => {
151151
return c.json({ message: 'invalid idToken' }, 400);
152152
}
153153
// Set session expiration to 5 days.
154-
const expiresIn = 60 * 60 * 24 * 5 * 1000;
154+
const expiresIn = 60 * 60 * 24 * 5;
155155
// Create the session cookie. This will also verify the ID token in the process.
156156
// The session cookie will have the same claims as the ID token.
157157
// To only allow session cookie setting on recent sign-in, auth_time in ID token

example/wrangler.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "firebase-auth-example"
2-
compatibility_date = "2023-12-01"
2+
compatibility_date = "2024-12-22"
33
workers_dev = true
44
main = "index.ts"
55

@@ -19,7 +19,7 @@ tsconfig = "./tsconfig.json"
1919
FIREBASE_AUTH_EMULATOR_HOST = "127.0.0.1:9099"
2020

2121
# See: https://cloud.google.com/iam/docs/keys-create-delete
22-
SERVICE_ACCOUNT_JSON = "{\"type\":\"service_account\",\"project_id\":\"project12345\",\"private_key_id\":\"xxxxxxxxxxxxxxxxx\",\"private_key\":\"-----BEGIN PRIVATE KEY-----XXXXXX-----END PRIVATE KEY-----\n\",\"client_email\":\"[email protected]\",\"client_id\":\"xxxxxx\",\"auth_uri\":\"https://accounts.google.com/o/oauth2/auth\",\"token_uri\":\"https://oauth2.googleapis.com/token\",\"auth_provider_x509_cert_url\":\"https://www.googleapis.com/oauth2/v1/certs\",\"client_x509_cert_url\":\"https://www.googleapis.com/robot/v1/metadata/x509/[email protected]\"}"
22+
SERVICE_ACCOUNT_JSON = '{"type":"service_account","project_id":"project12345","private_key_id":"xxxxxxxxxxxxxxxxx","private_key":"-----BEGIN PRIVATE KEY-----XXXXXX-----END PRIVATE KEY-----\n","client_email":"[email protected]","client_id":"xxxxxx","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/[email protected]"}'
2323

2424
# Setup user account in Emulator UI
2525
EMAIL_ADDRESS = "[email protected]"

0 commit comments

Comments
 (0)