Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix with-firebase-authentication example: Update the cookie when ID token refreshes on client #15628

Merged

Conversation

joejknowles
Copy link
Contributor

@joejknowles joejknowles commented Jul 29, 2020

I noticed a problem with the example - when you leave it logged in for more than an hour it breaks. The example API call starts to fail with auth/id-token-expired.

Looking at the code I saw that we never update the id token after signing in, but firebase automatically updates it every hour, meaning our verifyIdToken fails after an hour.

So I used the onIdTokenChanged function from firebase to update the cookie every time the id token changes.

I'm open to suggestions on refactoring the code I've added.

@ijjk ijjk added the examples Issue was opened via the examples template. label Jul 29, 2020
@ijjk
Copy link
Member

ijjk commented Jul 29, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 12.1s 12.1s -14ms
nodeModulesSize 65.5 MB 65.5 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
/ failed reqs 0 0
/ total time (seconds) 2.283 2.26 -0.02
/ avg req/sec 1095.04 1106.15 +11.11
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.359 1.435 ⚠️ +0.08
/error-in-render avg req/sec 1839.58 1742.52 ⚠️ -97.06
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..b7a9.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-c5a676d..82de.js gzip 6.75 kB 6.75 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.09 kB 6.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-079bffd..dule.js gzip 5.83 kB 5.83 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
Overall change 30.8 kB 30.8 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-a98d9..5cb7.js gzip 3.45 kB 3.45 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-6f8445b..99e1.js gzip 1.3 kB 1.3 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-d5979..dule.js gzip 2.3 kB 2.3 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-91516ae..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 274 B 274 B
_buildManife..dule.js gzip 282 B 282 B
Overall change 556 B 556 B
Rendered Page Sizes
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
index.html gzip 947 B 947 B
link.html gzip 952 B 952 B
withRouter.html gzip 937 B 937 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 13.8s 13.9s ⚠️ +144ms
nodeModulesSize 65.5 MB 65.5 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..b7a9.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-c5a676d..82de.js gzip 6.75 kB 6.75 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.09 kB 6.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-079bffd..dule.js gzip 5.83 kB 5.83 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
Overall change 30.8 kB 30.8 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-a98d9..5cb7.js gzip 3.45 kB 3.45 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-6f8445b..99e1.js gzip 1.3 kB 1.3 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-d5979..dule.js gzip 2.3 kB 2.3 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-91516ae..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 274 B 274 B
_buildManife..dule.js gzip 282 B 282 B
Overall change 556 B 556 B
Serverless bundles
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.2 MB 5.2 MB
Commit: 118b265

@ijjk
Copy link
Member

ijjk commented Jul 29, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 12.9s 12.6s -360ms
nodeModulesSize 65.5 MB 65.5 MB
Page Load Tests Overall increase ✓
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
/ failed reqs 0 0
/ total time (seconds) 2.425 2.397 -0.03
/ avg req/sec 1030.94 1042.78 +11.84
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.459 1.433 -0.03
/error-in-render avg req/sec 1714.09 1745.18 +31.09
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..b7a9.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-c5a676d..82de.js gzip 6.75 kB 6.75 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.09 kB 6.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-079bffd..dule.js gzip 5.83 kB 5.83 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
Overall change 30.8 kB 30.8 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-a98d9..5cb7.js gzip 3.45 kB 3.45 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-6f8445b..99e1.js gzip 1.3 kB 1.3 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-d5979..dule.js gzip 2.3 kB 2.3 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-91516ae..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 274 B 274 B
_buildManife..dule.js gzip 282 B 282 B
Overall change 556 B 556 B
Rendered Page Sizes
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
index.html gzip 947 B 947 B
link.html gzip 952 B 952 B
withRouter.html gzip 937 B 937 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 14s 14.4s ⚠️ +479ms
nodeModulesSize 65.5 MB 65.5 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..b7a9.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-c5a676d..82de.js gzip 6.75 kB 6.75 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.09 kB 6.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-079bffd..dule.js gzip 5.83 kB 5.83 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
Overall change 30.8 kB 30.8 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-a98d9..5cb7.js gzip 3.45 kB 3.45 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-6f8445b..99e1.js gzip 1.3 kB 1.3 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-d5979..dule.js gzip 2.3 kB 2.3 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-91516ae..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 274 B 274 B
_buildManife..dule.js gzip 282 B 282 B
Overall change 556 B 556 B
Serverless bundles
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.2 MB 5.2 MB
Commit: 2cac15e

@joejknowles
Copy link
Contributor Author

Running prettier now...

@@ -51,7 +51,7 @@ const Index = () => {
</Link>
</div>
{error && <div>Failed to fetch food!</div>}
{data ? (
{data && !error ? (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a tiny UI bug - when an error happened it still showed "Loading..." as well as "Failed to fetch food!"

@ijjk
Copy link
Member

ijjk commented Jul 29, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 14s 13.9s -88ms
nodeModulesSize 65.5 MB 65.5 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
/ failed reqs 0 0
/ total time (seconds) 2.542 2.711 ⚠️ +0.17
/ avg req/sec 983.51 922.03 ⚠️ -61.48
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.528 1.525 0
/error-in-render avg req/sec 1635.97 1639.23 +3.26
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..b7a9.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-c5a676d..82de.js gzip 6.75 kB 6.75 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.09 kB 6.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-079bffd..dule.js gzip 5.83 kB 5.83 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
Overall change 30.8 kB 30.8 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-a98d9..5cb7.js gzip 3.45 kB 3.45 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-6f8445b..99e1.js gzip 1.3 kB 1.3 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-d5979..dule.js gzip 2.3 kB 2.3 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-91516ae..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 274 B 274 B
_buildManife..dule.js gzip 282 B 282 B
Overall change 556 B 556 B
Rendered Page Sizes
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
index.html gzip 947 B 947 B
link.html gzip 952 B 952 B
withRouter.html gzip 937 B 937 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 15.5s 15.2s -332ms
nodeModulesSize 65.5 MB 65.5 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..b7a9.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-c5a676d..82de.js gzip 6.75 kB 6.75 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.09 kB 6.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-079bffd..dule.js gzip 5.83 kB 5.83 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
Overall change 30.8 kB 30.8 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-a98d9..5cb7.js gzip 3.45 kB 3.45 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-6f8445b..99e1.js gzip 1.3 kB 1.3 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-d5979..dule.js gzip 2.3 kB 2.3 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-91516ae..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 274 B 274 B
_buildManife..dule.js gzip 282 B 282 B
Overall change 556 B 556 B
Serverless bundles
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.2 MB 5.2 MB
Commit: 7c28a20

@@ -17,8 +22,6 @@ const useUser = () => {
.signOut()
.then(() => {
// Sign-out successful.
cookies.remove('auth')
setUser()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This happens automatically via the onIdTokenChanged below, so no need to duplicate it here.

@ijjk
Copy link
Member

ijjk commented Jul 29, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 12.5s 12s -441ms
nodeModulesSize 65.5 MB 65.5 MB
Page Load Tests Overall increase ✓
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
/ failed reqs 0 0
/ total time (seconds) 2.149 2.067 -0.08
/ avg req/sec 1163.46 1209.73 +46.27
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.151 1.165 ⚠️ +0.01
/error-in-render avg req/sec 2171.25 2145.25 ⚠️ -26
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..b7a9.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-c5a676d..82de.js gzip 6.75 kB 6.75 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.09 kB 6.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-079bffd..dule.js gzip 5.83 kB 5.83 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
Overall change 30.8 kB 30.8 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-a98d9..5cb7.js gzip 3.45 kB 3.45 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-6f8445b..99e1.js gzip 1.3 kB 1.3 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-d5979..dule.js gzip 2.3 kB 2.3 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-91516ae..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 274 B 274 B
_buildManife..dule.js gzip 282 B 282 B
Overall change 556 B 556 B
Rendered Page Sizes
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
index.html gzip 947 B 947 B
link.html gzip 952 B 952 B
withRouter.html gzip 937 B 937 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 13.2s 13s -235ms
nodeModulesSize 65.5 MB 65.5 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..b7a9.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-c5a676d..82de.js gzip 6.75 kB 6.75 kB
webpack-488d..c0e7.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.09 kB 6.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-079bffd..dule.js gzip 5.83 kB 5.83 kB
webpack-4f62..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-05..1236.js gzip 30.8 kB 30.8 kB
Overall change 30.8 kB 30.8 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-8f5f611..1f7b.js gzip 1.28 kB 1.28 kB
_error-a98d9..5cb7.js gzip 3.45 kB 3.45 kB
hooks-f7f3d0..7465.js gzip 887 B 887 B
index-08fb3f..c0e9.js gzip 227 B 227 B
link-6f8445b..99e1.js gzip 1.3 kB 1.3 kB
routerDirect..8aa1.js gzip 284 B 284 B
withRouter-f..e777.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-669dbe5..dule.js gzip 626 B 626 B
_error-d5979..dule.js gzip 2.3 kB 2.3 kB
hooks-805c40..dule.js gzip 387 B 387 B
index-6ba5a4..dule.js gzip 226 B 226 B
link-91516ae..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-d..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 274 B 274 B
_buildManife..dule.js gzip 282 B 282 B
Overall change 556 B 556 B
Serverless bundles
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.2 MB 5.2 MB
Commit: affee0b

}
})

const userFromCookie = getUserFromCookie()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the user retrieval from the cookie that existed before. It's not really necessary now, as it will be handled by onIdTokenChanged above, but I've left it in because I think it's a bit quicker to load than the firebase client library is 🤷‍♂️

@ijjk
Copy link
Member

ijjk commented Aug 3, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 13s 12.9s -79ms
nodeModulesSize 65.5 MB 65.5 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
/ failed reqs 0 0
/ total time (seconds) 2.327 2.313 -0.01
/ avg req/sec 1074.32 1081.02 +6.7
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.305 1.347 ⚠️ +0.04
/error-in-render avg req/sec 1915.58 1855.47 ⚠️ -60.11
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..afbf.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-5932771..4350.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-02cf3f6..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-4c..dbb6.js gzip 30.8 kB 30.8 kB
Overall change 30.8 kB 30.8 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-e97733c..af21.js gzip 1.3 kB 1.3 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-fbb1d2e..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 272 B 272 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 552 B 552 B
Rendered Page Sizes
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
index.html gzip 944 B 944 B
link.html gzip 953 B 953 B
withRouter.html gzip 939 B 939 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 14.7s 14.9s ⚠️ +235ms
nodeModulesSize 65.5 MB 65.5 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..afbf.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-5932771..4350.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-02cf3f6..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-4c..dbb6.js gzip 30.8 kB 30.8 kB
Overall change 30.8 kB 30.8 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-e97733c..af21.js gzip 1.3 kB 1.3 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-fbb1d2e..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 272 B 272 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 552 B 552 B
Serverless bundles
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.2 MB 5.2 MB
Commit: 0db0c5d

Copy link
Member

@Timer Timer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

@ijjk
Copy link
Member

ijjk commented Aug 5, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 12.8s 12.9s ⚠️ +118ms
nodeModulesSize 66 MB 66 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
/ failed reqs 0 0
/ total time (seconds) 2.304 2.295 -0.01
/ avg req/sec 1085.03 1089.31 +4.28
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.351 1.37 ⚠️ +0.02
/error-in-render avg req/sec 1849.99 1824.68 ⚠️ -25.31
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..afbf.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-76d73eb..95d8.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0b6ca7d..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-e97733c..af21.js gzip 1.3 kB 1.3 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-fbb1d2e..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 272 B 272 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 552 B 552 B
Rendered Page Sizes
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
index.html gzip 945 B 945 B
link.html gzip 953 B 953 B
withRouter.html gzip 939 B 939 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 14.3s 14.2s -103ms
nodeModulesSize 66 MB 66 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..afbf.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-76d73eb..95d8.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0b6ca7d..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-e97733c..af21.js gzip 1.3 kB 1.3 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-fbb1d2e..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 272 B 272 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 552 B 552 B
Serverless bundles
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.2 MB 5.2 MB
Commit: 163b181

@ijjk
Copy link
Member

ijjk commented Aug 5, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 11.6s 11.2s -307ms
nodeModulesSize 66 MB 66 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
/ failed reqs 0 0
/ total time (seconds) 2.086 2.073 -0.01
/ avg req/sec 1198.2 1206.24 +8.04
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.128 1.146 ⚠️ +0.02
/error-in-render avg req/sec 2215.41 2181.3 ⚠️ -34.11
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..afbf.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-76d73eb..95d8.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0b6ca7d..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-e97733c..af21.js gzip 1.3 kB 1.3 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-fbb1d2e..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 272 B 272 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 552 B 552 B
Rendered Page Sizes
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
index.html gzip 945 B 945 B
link.html gzip 953 B 953 B
withRouter.html gzip 939 B 939 B
Overall change 2.84 kB 2.84 kB

Serverless Mode
General
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
buildDuration 12.7s 12.7s ⚠️ +20ms
nodeModulesSize 66 MB 66 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..afbf.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
main-76d73eb..95d8.js gzip 6.73 kB 6.73 kB
webpack-ccf5..276a.js gzip 751 B 751 B
Overall change 56.8 kB 56.8 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
main-0b6ca7d..dule.js gzip 5.81 kB 5.81 kB
webpack-10c7..dule.js gzip 751 B 751 B
Overall change 51.8 kB 51.8 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
polyfills-75..1629.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-874bd8a..0103.js gzip 1.28 kB 1.28 kB
_error-fa39c..ec40.js gzip 3.45 kB 3.45 kB
hooks-585f07..95a3.js gzip 887 B 887 B
index-c7b63f..fc02.js gzip 227 B 227 B
link-e97733c..af21.js gzip 1.3 kB 1.3 kB
routerDirect..ebc7.js gzip 284 B 284 B
withRouter-2..db68.js gzip 284 B 284 B
Overall change 7.72 kB 7.72 kB
Client Pages Modern
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_app-97e743e..dule.js gzip 626 B 626 B
_error-b4004..dule.js gzip 2.3 kB 2.3 kB
hooks-696209..dule.js gzip 387 B 387 B
index-a4dd74..dule.js gzip 226 B 226 B
link-fbb1d2e..dule.js gzip 1.25 kB 1.25 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-1..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_buildManifest.js gzip 272 B 272 B
_buildManife..dule.js gzip 280 B 280 B
Overall change 552 B 552 B
Serverless bundles
vercel/next.js canary joejknowles/next.js firebase-auth-example-token-expiry Change
_error.js 1.02 MB 1.02 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.02 MB 1.02 MB
link.js 1.06 MB 1.06 MB
routerDirect.js 1.05 MB 1.05 MB
withRouter.js 1.05 MB 1.05 MB
Overall change 5.2 MB 5.2 MB
Commit: c7b434c

@kodiakhq kodiakhq bot merged commit 432a1de into vercel:canary Aug 5, 2020
@francisrod01
Copy link
Contributor

I look forward to see this fixed. #16010

@@ -0,0 +1,8 @@
export const mapUserData = user => {
const { uid, email, xa } = user
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joejknowles Do you know where this xa property is coming from? Doesn't seem to be documented in the Firebase SDK and I feel like I'm losing my mind.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't, this was just from the existing code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, I think it was on the user object from Firebase, but I didn't find any documentation or anything.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vriad this was in the coffee before actually, if it helps:
// xa is the access token, which can be retrieved through // firebase.auth().currentUser.getIdToken()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. thank you 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joejknowles is correct, xais the access token from Firebase 👍

@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue was opened via the examples template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants