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

Add docs on authentication patterns. #16277

Merged
merged 14 commits into from
Dec 31, 2020
Merged

Conversation

leerob
Copy link
Member

@leerob leerob commented Aug 17, 2020

Building off this Slack conversation, this PR adds a top-level section to the documentation on authentication patterns.

Please provide any and all comments! A few open thoughts I have:

  • Should this include code snippets from the related providers or stay very high-level? At what point do we delegate to the examples folder? Keep things high level and delegate to examples folder
  • Should this include any related cards at the bottom? Added to the bottom
  • Should other places in the documentation link back to here? Added link from routing
  • Should it be a top-level route, or be underneath advanced?

docs/authentication.md Outdated Show resolved Hide resolved
@ijjk
Copy link
Member

ijjk commented Aug 17, 2020

Stats from current PR

Default Server Mode
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 11.9s 12.4s ⚠️ +445ms
nodeModulesSize 57.6 MB 57.6 MB
Page Load Tests Overall increase ✓
vercel/next.js canary leerob/next.js authentication-docs Change
/ failed reqs 0 0
/ total time (seconds) 2.113 2.188 ⚠️ +0.08
/ avg req/sec 1183.21 1142.55 ⚠️ -40.66
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.265 1.239 -0.03
/error-in-render avg req/sec 1976.7 2017.83 +41.13
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..aa9e.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39 kB 39 kB
main-8ce57b4..33a2.js gzip 7.17 kB 7.17 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-2e2a2fb..dule.js gzip 6.18 kB 6.18 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52 kB 52 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-1464c..a26f.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-00b8972..6e4e.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.7 kB 7.7 kB
Client Pages Modern
vercel/next.js canary leerob/next.js authentication-docs Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-e550f..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-72c64d9..dule.js gzip 1.27 kB 1.27 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary leerob/next.js authentication-docs Change
index.html gzip 946 B 946 B
link.html gzip 950 B 950 B
withRouter.html gzip 938 B 938 B
Overall change 2.83 kB 2.83 kB

Serverless Mode
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 13.8s 14s ⚠️ +165ms
nodeModulesSize 57.6 MB 57.6 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..aa9e.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39 kB 39 kB
main-8ce57b4..33a2.js gzip 7.17 kB 7.17 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-2e2a2fb..dule.js gzip 6.18 kB 6.18 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52 kB 52 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-1464c..a26f.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-00b8972..6e4e.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.7 kB 7.7 kB
Client Pages Modern
vercel/next.js canary leerob/next.js authentication-docs Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-e550f..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-72c64d9..dule.js gzip 1.27 kB 1.27 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary leerob/next.js authentication-docs Change
_error.js 1.03 MB 1.03 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB
routerDirect.js 1.07 MB 1.07 MB
withRouter.js 1.07 MB 1.07 MB
Overall change 5.27 MB 5.27 MB
Commit: 68dde87

docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
docs/authentication.md Outdated Show resolved Hide resolved
@lfades
Copy link
Member

lfades commented Aug 17, 2020

Should this include code snippets from the related providers or stay very high-level? At what point do we delegate to the examples folder?

Only to explain the authentication pattern, always link to examples that show how it works.

Should this include any related cards at the bottom?

Yes, one for the Data Fetching docs

Should other places in the documentation link back to here?

If there are mentions to auth.

Should it be a top-level route, or be underneath advanced?

I'm not sure, we can decide this once the page is finished.

docs/authentication.md Outdated Show resolved Hide resolved

# Authentication

Authentication verifies who a user is, while authorization controls what a user can access. Next.js supports multiple patterns for authentication, each designed for different use cases. This guide will allow you to choose your adventure based on your constraints.
Copy link
Member

Choose a reason for hiding this comment

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

Next.js supports multiple patterns for authentication, each designed for different use cases. This guide will allow you to choose your adventure based on your constraints.

This sounds like if it were a Next.js feature 🤔

Copy link
Member Author

@leerob leerob Aug 17, 2020

Choose a reason for hiding this comment

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

Yeah, that's a good point. In a way, it kind of is. Using CRA you wouldn't be able to support SSR authentication. Would this read better with the last sentence removed?

@ijjk
Copy link
Member

ijjk commented Aug 18, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 10.9s 11s ⚠️ +98ms
nodeModulesSize 57.6 MB 57.6 MB
Page Load Tests Overall increase ✓
vercel/next.js canary leerob/next.js authentication-docs Change
/ failed reqs 0 0
/ total time (seconds) 1.968 1.9 -0.07
/ avg req/sec 1270.5 1316.06 +45.56
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.076 1.06 -0.02
/error-in-render avg req/sec 2323.44 2358.02 +34.58
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..aa9e.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39 kB 39 kB
main-a8b6d00..223c.js gzip 7.17 kB 7.17 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-f294dd0..dule.js gzip 6.18 kB 6.18 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52 kB 52 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-1464c..a26f.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-00b8972..6e4e.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.7 kB 7.7 kB
Client Pages Modern
vercel/next.js canary leerob/next.js authentication-docs Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-e550f..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-72c64d9..dule.js gzip 1.27 kB 1.27 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary leerob/next.js authentication-docs Change
index.html gzip 946 B 946 B
link.html gzip 951 B 951 B
withRouter.html gzip 938 B 938 B
Overall change 2.83 kB 2.83 kB

Serverless Mode
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 12.5s 12.5s -9ms
nodeModulesSize 57.6 MB 57.6 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..aa9e.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39 kB 39 kB
main-a8b6d00..223c.js gzip 7.17 kB 7.17 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-f294dd0..dule.js gzip 6.18 kB 6.18 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52 kB 52 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-1464c..a26f.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-00b8972..6e4e.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.7 kB 7.7 kB
Client Pages Modern
vercel/next.js canary leerob/next.js authentication-docs Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-e550f..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-72c64d9..dule.js gzip 1.27 kB 1.27 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary leerob/next.js authentication-docs Change
_error.js 1.03 MB 1.03 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB
routerDirect.js 1.07 MB 1.07 MB
withRouter.js 1.07 MB 1.07 MB
Overall change 5.27 MB 5.27 MB
Commit: 3380294

@ijjk
Copy link
Member

ijjk commented Aug 18, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 12.8s 13.1s ⚠️ +305ms
nodeModulesSize 57.6 MB 57.6 MB
Page Load Tests Overall increase ✓
vercel/next.js canary leerob/next.js authentication-docs Change
/ failed reqs 0 0
/ total time (seconds) 2.295 2.233 -0.06
/ avg req/sec 1089.33 1119.48 +30.15
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.367 1.262 -0.1
/error-in-render avg req/sec 1828.92 1980.55 +151.63
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..aa9e.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39 kB 39 kB
main-a8b6d00..223c.js gzip 7.17 kB 7.17 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-f294dd0..dule.js gzip 6.18 kB 6.18 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52 kB 52 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-1464c..a26f.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-00b8972..6e4e.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.7 kB 7.7 kB
Client Pages Modern
vercel/next.js canary leerob/next.js authentication-docs Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-e550f..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-72c64d9..dule.js gzip 1.27 kB 1.27 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Rendered Page Sizes
vercel/next.js canary leerob/next.js authentication-docs Change
index.html gzip 946 B 946 B
link.html gzip 951 B 951 B
withRouter.html gzip 938 B 938 B
Overall change 2.83 kB 2.83 kB

Serverless Mode
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 15.3s 15.2s -104ms
nodeModulesSize 57.6 MB 57.6 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..aa9e.js gzip 10.2 kB 10.2 kB
framework.HASH.js gzip 39 kB 39 kB
main-a8b6d00..223c.js gzip 7.17 kB 7.17 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 57.1 kB 57.1 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..dule.js gzip 6.11 kB 6.11 kB
framework.HA..dule.js gzip 39 kB 39 kB
main-f294dd0..dule.js gzip 6.18 kB 6.18 kB
webpack-07c5..dule.js gzip 751 B 751 B
Overall change 52 kB 52 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-9a0b9e1..b37e.js gzip 1.28 kB 1.28 kB
_error-1464c..a26f.js gzip 3.44 kB 3.44 kB
hooks-89731c..c609.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-00b8972..6e4e.js gzip 1.3 kB 1.3 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 7.7 kB 7.7 kB
Client Pages Modern
vercel/next.js canary leerob/next.js authentication-docs Change
_app-75d3a82..dule.js gzip 625 B 625 B
_error-e550f..dule.js gzip 2.29 kB 2.29 kB
hooks-cbf13f..dule.js gzip 387 B 387 B
index-b9a643..dule.js gzip 226 B 226 B
link-72c64d9..dule.js gzip 1.27 kB 1.27 kB
routerDirect..dule.js gzip 284 B 284 B
withRouter-f..dule.js gzip 282 B 282 B
Overall change 5.36 kB 5.36 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 322 B 322 B
_buildManife..dule.js gzip 330 B 330 B
Overall change 652 B 652 B
Serverless bundles
vercel/next.js canary leerob/next.js authentication-docs Change
_error.js 1.03 MB 1.03 MB
404.html 4.18 kB 4.18 kB
hooks.html 3.82 kB 3.82 kB
index.js 1.03 MB 1.03 MB
link.js 1.07 MB 1.07 MB
routerDirect.js 1.07 MB 1.07 MB
withRouter.js 1.07 MB 1.07 MB
Overall change 5.27 MB 5.27 MB
Commit: ce9a4be


If you have an existing database with user data, you'll likely want to utilize an open-source solution that's provider agnostic.

- If you need email/password log-in, use `next-iron-session`.
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for mentioning next-iron-session in many places here, appreciated! One thing I'd like to add is that I use next-iron-session with a slack-only login. Not even user/password. Not sure how we could update this part so next-iron-session is not seen as a email/password only.

any ideas?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure it makes sense to mention Slack login – it seems like a small use case. Can we explain the pros/cons of next-iron-session better for why you might use it over next-auth?

Copy link
Member Author

Choose a reason for hiding this comment

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

Following up @vvo – do you have any thoughts?

Copy link
Member

@vvo vvo Oct 5, 2020

Choose a reason for hiding this comment

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

Here's a proposal:


Here's some information to help you decide on using use next-auth or next-iron-session:

next-auth combines sessions, authentication providers (GitHub, Apple and 20+) and user accounts (if you need it) into a single package. Session data can be stored on your server (database) or on the clients (JWT/JWE).

Example usage: You want to add a GitHub login, have it create user accounts and use JWTs as sessions, use next-auth.

next-iron-session provides req.session.set/get/unset/save/destroy methods and that's it. The session data is encrypted and stored on the client as secured, http-only and same-site:lax cookies.

Example usage: You want sessions helpers you can plug wherever you want, and a small API.


Do you want me to add this as a suggestion to your document via GitHub?

Side note: next-auth definitely looks like a more complete solution than next-iron-session. But they have different goals and public.

For example, I get "scared" the more options I see in a library. Because it usually means it will get into my way at some point.

Others will get scared by the scarcity of packages like next-iron-session, wondering how they could use that to build their GitHub OAuth login for their app.

Let me know!

Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW I love the idea of steering by example use cases so people can find the right solution for their scenario.

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR was just a starting point, happy to further iterate on this auth section. It's long overdue!

docs/authentication.md Outdated Show resolved Hide resolved
)
}

export const getServerSideProps = withSession(async function ({ req, res }) {
Copy link
Member

Choose a reason for hiding this comment

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

I wonder how easy it is to follow this because even me I searched for the code behind "withSession" only to understand it's not in the article but I would have to go in the GitHub example instead.

@vercel vercel bot temporarily deployed to Preview November 25, 2020 23:08 Inactive
@ijjk
Copy link
Member

ijjk commented Nov 25, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 9.9s 10.2s ⚠️ +207ms
nodeModulesSize 85 MB 85 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary leerob/next.js authentication-docs Change
/ failed reqs 0 0
/ total time (seconds) 2.245 2.214 -0.03
/ avg req/sec 1113.7 1129.42 +15.72
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.312 1.343 ⚠️ +0.03
/error-in-render avg req/sec 1905.89 1861.67 ⚠️ -44.22
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..8b6e.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-90b3d5a..55ad.js gzip 6.54 kB 6.54 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-fca3d..2eb1.js gzip 3.44 kB 3.44 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary leerob/next.js authentication-docs Change
index.html gzip 614 B 614 B
link.html gzip 621 B 621 B
withRouter.html gzip 608 B 608 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 12.2s 11.8s -465ms
nodeModulesSize 85 MB 85 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..8b6e.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-90b3d5a..55ad.js gzip 6.54 kB 6.54 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-7231d4b..5856.js gzip 1.28 kB 1.28 kB
_error-fca3d..2eb1.js gzip 3.44 kB 3.44 kB
hooks-d4591d..e7c2.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-db223d9..dbd7.js gzip 1.61 kB 1.61 kB
routerDirect..924c.js gzip 284 B 284 B
withRouter-7..c13d.js gzip 284 B 284 B
Overall change 8.01 kB 8.01 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary leerob/next.js authentication-docs Change
_error.js 996 kB 996 kB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 996 kB 996 kB
link.js 1.05 MB 1.05 MB
routerDirect.js 1.04 MB 1.04 MB
withRouter.js 1.04 MB 1.04 MB
Overall change 5.13 MB 5.13 MB
Commit: ac9841b

@vercel vercel bot temporarily deployed to Preview December 21, 2020 23:43 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 21, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 9.8s 9.6s -180ms
nodeModulesSize 82.6 MB 82.6 MB
Page Load Tests Overall increase ✓
vercel/next.js canary leerob/next.js authentication-docs Change
/ failed reqs 0 0
/ total time (seconds) 1.991 1.947 -0.04
/ avg req/sec 1255.9 1284.25 +28.35
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.252 1.175 -0.08
/error-in-render avg req/sec 1997.55 2128.46 +130.91
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..5e70.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-72193d1..1356.js gzip 6.56 kB 6.56 kB
webpack-95c2..e870.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-d3..23f6.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-0d19cb6..5497.js gzip 1.28 kB 1.28 kB
_error-85785..a9f3.js gzip 3.44 kB 3.44 kB
hooks-42456f..0c06.js gzip 887 B 887 B
index-8081ce..e44f.js gzip 227 B 227 B
link-0ab9f83..fa00.js gzip 1.61 kB 1.61 kB
routerDirect..c3d8.js gzip 303 B 303 B
withRouter-0..a68e.js gzip 302 B 302 B
Overall change 8.05 kB 8.05 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Rendered Page Sizes
vercel/next.js canary leerob/next.js authentication-docs Change
index.html gzip 613 B 613 B
link.html gzip 618 B 618 B
withRouter.html gzip 607 B 607 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 11.6s 11.5s -86ms
nodeModulesSize 82.6 MB 82.6 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..5e70.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-72193d1..1356.js gzip 6.56 kB 6.56 kB
webpack-95c2..e870.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-d3..23f6.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-0d19cb6..5497.js gzip 1.28 kB 1.28 kB
_error-85785..a9f3.js gzip 3.44 kB 3.44 kB
hooks-42456f..0c06.js gzip 887 B 887 B
index-8081ce..e44f.js gzip 227 B 227 B
link-0ab9f83..fa00.js gzip 1.61 kB 1.61 kB
routerDirect..c3d8.js gzip 303 B 303 B
withRouter-0..a68e.js gzip 302 B 302 B
Overall change 8.05 kB 8.05 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Serverless bundles
vercel/next.js canary leerob/next.js authentication-docs Change
_error.js 1 MB 1 MB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 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.16 MB 5.16 MB
Commit: 9dc2c6a

@vercel vercel bot temporarily deployed to Preview December 29, 2020 18:10 Inactive
@vercel vercel bot temporarily deployed to Preview December 29, 2020 18:12 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 29, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 10.5s 10.8s ⚠️ +253ms
nodeModulesSize 82.7 MB 82.7 MB
Page Load Tests Overall increase ✓
vercel/next.js canary leerob/next.js authentication-docs Change
/ failed reqs 0 0
/ total time (seconds) 2.092 2.082 -0.01
/ avg req/sec 1195 1200.53 +5.53
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.315 1.31 0
/error-in-render avg req/sec 1900.83 1907.81 +6.98
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..68d0.js gzip 12.7 kB 12.7 kB
framework.HASH.js gzip 39 kB 39 kB
main-8d1eb02..37d1.js gzip 6.56 kB 6.56 kB
webpack-95c2..e870.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-d3..23f6.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-0d19cb6..5497.js gzip 1.28 kB 1.28 kB
_error-85785..a9f3.js gzip 3.44 kB 3.44 kB
hooks-42456f..0c06.js gzip 887 B 887 B
index-8081ce..e44f.js gzip 227 B 227 B
link-0ab9f83..fa00.js gzip 1.61 kB 1.61 kB
routerDirect..c3d8.js gzip 303 B 303 B
withRouter-0..a68e.js gzip 302 B 302 B
Overall change 8.05 kB 8.05 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Rendered Page Sizes
vercel/next.js canary leerob/next.js authentication-docs Change
index.html gzip 614 B 614 B
link.html gzip 619 B 619 B
withRouter.html gzip 607 B 607 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 12.4s 12.4s ⚠️ +60ms
nodeModulesSize 82.7 MB 82.7 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..68d0.js gzip 12.7 kB 12.7 kB
framework.HASH.js gzip 39 kB 39 kB
main-8d1eb02..37d1.js gzip 6.56 kB 6.56 kB
webpack-95c2..e870.js gzip 751 B 751 B
Overall change 59 kB 59 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-d3..23f6.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-0d19cb6..5497.js gzip 1.28 kB 1.28 kB
_error-85785..a9f3.js gzip 3.44 kB 3.44 kB
hooks-42456f..0c06.js gzip 887 B 887 B
index-8081ce..e44f.js gzip 227 B 227 B
link-0ab9f83..fa00.js gzip 1.61 kB 1.61 kB
routerDirect..c3d8.js gzip 303 B 303 B
withRouter-0..a68e.js gzip 302 B 302 B
Overall change 8.05 kB 8.05 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Serverless bundles
vercel/next.js canary leerob/next.js authentication-docs Change
_error.js 1 MB 1 MB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 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.16 MB 5.16 MB
Commit: 19a83a2

@vercel vercel bot temporarily deployed to Preview December 30, 2020 16:33 Inactive
@vercel vercel bot temporarily deployed to Preview December 31, 2020 07:51 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 31, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 8.6s 8.7s ⚠️ +83ms
nodeModulesSize 83 MB 83 MB
Page Load Tests Overall increase ✓
vercel/next.js canary leerob/next.js authentication-docs Change
/ failed reqs 0 0
/ total time (seconds) 1.73 1.602 -0.13
/ avg req/sec 1445.27 1560.63 +115.36
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.051 1.093 ⚠️ +0.04
/error-in-render avg req/sec 2378.88 2287.7 ⚠️ -91.18
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..6cec.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-5b13c61..eaca.js gzip 6.59 kB 6.59 kB
webpack-7193..1446.js gzip 751 B 751 B
Overall change 59.1 kB 59.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-67..b7d1.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-6220e08..9a40.js gzip 1.28 kB 1.28 kB
_error-4b0b5..2c91.js gzip 3.44 kB 3.44 kB
hooks-5f309a..7282.js gzip 887 B 887 B
index-57f580..c562.js gzip 227 B 227 B
link-1a1f628..eeb5.js gzip 1.61 kB 1.61 kB
routerDirect..bd82.js gzip 303 B 303 B
withRouter-2..e384.js gzip 302 B 302 B
Overall change 8.05 kB 8.05 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 322 B 322 B
Overall change 322 B 322 B
Rendered Page Sizes
vercel/next.js canary leerob/next.js authentication-docs Change
index.html gzip 617 B 617 B
link.html gzip 621 B 621 B
withRouter.html gzip 610 B 610 B
Overall change 1.85 kB 1.85 kB

Serverless Mode
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 10.4s 10.3s -102ms
nodeModulesSize 83 MB 83 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..6cec.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-5b13c61..eaca.js gzip 6.59 kB 6.59 kB
webpack-7193..1446.js gzip 751 B 751 B
Overall change 59.1 kB 59.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-67..b7d1.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-6220e08..9a40.js gzip 1.28 kB 1.28 kB
_error-4b0b5..2c91.js gzip 3.44 kB 3.44 kB
hooks-5f309a..7282.js gzip 887 B 887 B
index-57f580..c562.js gzip 227 B 227 B
link-1a1f628..eeb5.js gzip 1.61 kB 1.61 kB
routerDirect..bd82.js gzip 303 B 303 B
withRouter-2..e384.js gzip 302 B 302 B
Overall change 8.05 kB 8.05 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 322 B 322 B
Overall change 322 B 322 B
Serverless bundles
vercel/next.js canary leerob/next.js authentication-docs Change
_error.js 1 MB 1 MB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 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.17 MB 5.17 MB
Commit: 2bf2781

@vercel vercel bot temporarily deployed to Preview December 31, 2020 08:08 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 31, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 11s 10.8s -246ms
nodeModulesSize 83 MB 83 MB
Page Load Tests Overall increase ✓
vercel/next.js canary leerob/next.js authentication-docs Change
/ failed reqs 0 0
/ total time (seconds) 2.208 2.176 -0.03
/ avg req/sec 1132.15 1148.89 +16.74
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.34 1.345 0
/error-in-render avg req/sec 1865.18 1858.35 ⚠️ -6.83
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..8a8f.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-5b13c61..eaca.js gzip 6.59 kB 6.59 kB
webpack-7193..1446.js gzip 751 B 751 B
Overall change 59.1 kB 59.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-67..b7d1.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-6220e08..9a40.js gzip 1.28 kB 1.28 kB
_error-4b0b5..2c91.js gzip 3.44 kB 3.44 kB
hooks-5f309a..7282.js gzip 887 B 887 B
index-57f580..c562.js gzip 227 B 227 B
link-b862cd7..dba8.js gzip 1.64 kB 1.64 kB
routerDirect..bd82.js gzip 303 B 303 B
withRouter-2..e384.js gzip 302 B 302 B
Overall change 8.08 kB 8.08 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary leerob/next.js authentication-docs Change
index.html gzip 616 B 616 B
link.html gzip 622 B 622 B
withRouter.html gzip 610 B 610 B
Overall change 1.85 kB 1.85 kB

Serverless Mode
General
vercel/next.js canary leerob/next.js authentication-docs Change
buildDuration 13.2s 12.9s -268ms
nodeModulesSize 83 MB 83 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary leerob/next.js authentication-docs Change
677f882d2ed8..8a8f.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-5b13c61..eaca.js gzip 6.59 kB 6.59 kB
webpack-7193..1446.js gzip 751 B 751 B
Overall change 59.1 kB 59.1 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary leerob/next.js authentication-docs Change
polyfills-67..b7d1.js gzip 31.2 kB 31.2 kB
Overall change 31.2 kB 31.2 kB
Client Pages
vercel/next.js canary leerob/next.js authentication-docs Change
_app-6220e08..9a40.js gzip 1.28 kB 1.28 kB
_error-4b0b5..2c91.js gzip 3.44 kB 3.44 kB
hooks-5f309a..7282.js gzip 887 B 887 B
index-57f580..c562.js gzip 227 B 227 B
link-b862cd7..dba8.js gzip 1.64 kB 1.64 kB
routerDirect..bd82.js gzip 303 B 303 B
withRouter-2..e384.js gzip 302 B 302 B
Overall change 8.08 kB 8.08 kB
Client Build Manifests
vercel/next.js canary leerob/next.js authentication-docs Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary leerob/next.js authentication-docs Change
_error.js 1 MB 1 MB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 1 MB 1 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.17 MB 5.17 MB
Commit: 8038f35

@kodiakhq kodiakhq bot merged commit 380afbf into vercel:canary Dec 31, 2020
@leerob leerob deleted the authentication-docs branch January 2, 2021 14:37
@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants