No description
Find a file
Joseph Knowles 432a1dec6a
Fix with-firebase-authentication example: Update the cookie when ID token refreshes on client (#15628)
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.
2020-08-05 08:38:26 +00:00
.github Test webpack 5 beta (#15645) 2020-07-29 19:19:32 -04:00
.vscode skip node internals (#13345) 2020-05-25 16:21:06 +02:00
bench Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
docs Explain Sass Extensions in CSS Docs (#15830) 2020-08-03 23:50:46 -04:00
errors Disallow basePath: false for internal routes (#15837) 2020-08-04 17:50:09 +00:00
examples Fix with-firebase-authentication example: Update the cookie when ID token refreshes on client (#15628) 2020-08-05 08:38:26 +00:00
packages v9.5.2-canary.6 2020-08-04 22:28:36 -04:00
test Run Fast Refresh Loader in Babel Loader (#15851) 2020-08-04 21:24:56 +00:00
.eslintignore [examples] with-ts-eslint-jest example app (#12025) 2020-05-25 13:16:06 -05:00
.eslintrc.json Remove unused variable (#13716) 2020-06-03 11:58:58 -04:00
.gitignore Add .vercel to gitignore (#13595) 2020-05-31 20:53:08 +00:00
.npmrc Remove version prefix 2018-10-02 01:35:56 +02:00
.prettierignore Migrate PR stats action into Next.js repo (#13177) 2020-05-21 14:07:27 +02:00
.prettierignore_staged Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
.prettierrc.json Prettier trailingComma default value to es5 since 2.0 (#14391) 2020-06-22 13:25:24 +02:00
azure-pipelines.yml Update to track test timings separate for Azure and Actions (#12083) 2020-04-21 16:11:04 -04:00
check-git-ignore.sh Added .gitignore to examples that are deployed to vercel (#15127) 2020-07-16 10:52:23 -04:00
check-pre-compiled.sh Pre-ncc compiled packages to prevent re-nccing unnecessarily (#11569) 2020-04-07 09:42:16 -04:00
CODE_OF_CONDUCT.md Update Code of Conduct email address (#12108) 2020-04-22 16:27:24 +02:00
contributing.md Suggest npx over npm init (#13637) 2020-06-01 17:36:57 +00:00
jest.config.js Use the jest-circus test runner (#12974) 2020-05-16 16:56:06 -04:00
lerna.json v9.5.2-canary.6 2020-08-04 22:28:36 -04:00
license.md Update year on license files 2020-04-21 12:24:08 +02:00
lint-staged.config.js Update browserslist/caniuse-lite (#13605) 2020-05-31 19:37:01 +00:00
package.json Fix some webpack 5 deprecation warnings (#15797) 2020-08-03 12:57:17 +00:00
publish-release.sh Make sure to exit publish script with correct code (#10310) 2020-01-28 14:03:32 -05:00
readme.md Monorepo (#5341) 2018-10-01 01:02:10 +02:00
release.js Remove console log from release script (#15652) 2020-07-29 22:37:56 +00:00
run-tests.js Stabilize more tests (#15470) 2020-07-26 04:57:06 +00:00
SECURITY.md Create SECURITY.md 2020-07-13 19:25:08 +02:00
test-file.txt Add additional file serving tests (#12479) 2020-05-04 11:58:19 -05:00
UPGRADING.md Move upgrading guide to /docs (#10727) 2020-02-28 23:46:18 +01:00
yarn.lock fixed issue with runtime-config returning undefined when building or in a development environment (#15777) 2020-08-04 16:47:37 +00:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Who is using Next.js?

Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.

Contributing

Please see our contributing.md.

Authors