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

Update authentication examples #19330

Conversation

lfades
Copy link
Member

@lfades lfades commented Nov 19, 2020

Improves the setup of our current auth examples that have basic auth to a more complete one, matching the updated api-routes-apollo-server-and-client-auth. Also updated the readme for with-magic.

Closes #19252

@ijjk ijjk added the examples Issue/PR related to examples label Nov 19, 2020
@vercel vercel bot temporarily deployed to Preview November 19, 2020 20:13 Inactive
@ijjk
Copy link
Member

ijjk commented Nov 19, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
buildDuration 10.6s 10.4s -179ms
nodeModulesSize 84.9 MB 84.9 MB
Page Load Tests Overall increase ✓
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
/ failed reqs 0 0
/ total time (seconds) 2.385 2.391 ⚠️ +0.01
/ avg req/sec 1048.34 1045.54 ⚠️ -2.8
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.555 1.502 -0.05
/error-in-render avg req/sec 1607.67 1664.28 +56.61
Client Bundles (main, webpack, commons)
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
677f882d2ed8..4972.js gzip 12.7 kB 12.7 kB
framework.HASH.js gzip 39 kB 39 kB
main-f1a49fb..e45e.js gzip 6.52 kB 6.52 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.9 kB 58.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
_app-3b0cf13..85f8.js gzip 1.28 kB 1.28 kB
_error-6f635..c393.js gzip 3.44 kB 3.44 kB
hooks-d4ffc3..9e0f.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-b618194..5477.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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Rendered Page Sizes
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
index.html gzip 613 B 613 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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
buildDuration 12.6s 12.4s -149ms
nodeModulesSize 84.9 MB 84.9 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
677f882d2ed8..4972.js gzip 12.7 kB 12.7 kB
framework.HASH.js gzip 39 kB 39 kB
main-f1a49fb..e45e.js gzip 6.52 kB 6.52 kB
webpack-e067..f178.js gzip 751 B 751 B
Overall change 58.9 kB 58.9 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
polyfills-4b..e242.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
_app-3b0cf13..85f8.js gzip 1.28 kB 1.28 kB
_error-6f635..c393.js gzip 3.44 kB 3.44 kB
hooks-d4ffc3..9e0f.js gzip 887 B 887 B
index-17468f..5d83.js gzip 227 B 227 B
link-b618194..5477.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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
_buildManifest.js gzip 321 B 321 B
Overall change 321 B 321 B
Serverless bundles
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
_error.js 914 kB 914 kB
404.html 2.67 kB 2.67 kB
hooks.html 1.92 kB 1.92 kB
index.js 915 kB 915 kB
link.js 973 kB 973 kB
routerDirect.js 966 kB 966 kB
withRouter.js 966 kB 966 kB
Overall change 4.74 MB 4.74 MB
Commit: 9ae7562

@lfades lfades requested a review from leerob November 19, 2020 21:13
examples/with-magic/README.md Show resolved Hide resolved
examples/with-magic/README.md Show resolved Hide resolved
examples/with-magic/README.md Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview December 25, 2020 20:27 Inactive
@ijjk
Copy link
Member

ijjk commented Dec 25, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
buildDuration 8.8s 8.7s -52ms
nodeModulesSize 82.6 MB 82.6 MB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
/ failed reqs 0 0
/ total time (seconds) 1.694 1.738 ⚠️ +0.04
/ avg req/sec 1475.89 1438.1 ⚠️ -37.79
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.068 1.071 0
/error-in-render avg req/sec 2340.02 2333.58 ⚠️ -6.44
Client Bundles (main, webpack, commons)
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
677f882d2ed8..5e70.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-e0d2962..b163.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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
polyfills-d3..23f6.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Rendered Page Sizes
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
index.html gzip 612 B 612 B
link.html gzip 620 B 620 B
withRouter.html gzip 607 B 607 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
buildDuration 10.3s 10.4s ⚠️ +75ms
nodeModulesSize 82.6 MB 82.6 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
677f882d2ed8..5e70.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-e0d2962..b163.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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
polyfills-d3..23f6.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Serverless bundles
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 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: a8fe1d5

@vercel vercel bot temporarily deployed to Preview December 27, 2020 23:39 Inactive
Copy link
Member

@leerob leerob left a comment

Choose a reason for hiding this comment

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

Thank you for updating these!

@ijjk
Copy link
Member

ijjk commented Dec 27, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
buildDuration 9.3s 9.5s ⚠️ +133ms
nodeModulesSize 82.6 MB 82.6 MB
Page Load Tests Overall increase ✓
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
/ failed reqs 0 0
/ total time (seconds) 1.973 1.82 -0.15
/ avg req/sec 1266.92 1373.75 +106.83
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.191 1.132 -0.06
/error-in-render avg req/sec 2098.48 2208.71 +110.23
Client Bundles (main, webpack, commons)
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
677f882d2ed8..5e70.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-e0d2962..b163.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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
polyfills-d3..23f6.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Rendered Page Sizes
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
index.html gzip 612 B 612 B
link.html gzip 620 B 620 B
withRouter.html gzip 607 B 607 B
Overall change 1.84 kB 1.84 kB

Serverless Mode
General
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
buildDuration 11s 11.4s ⚠️ +460ms
nodeModulesSize 82.6 MB 82.6 MB
Client Bundles (main, webpack, commons)
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
677f882d2ed8..5e70.js gzip 12.8 kB 12.8 kB
framework.HASH.js gzip 39 kB 39 kB
main-e0d2962..b163.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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
polyfills-d3..23f6.js gzip 31 kB 31 kB
Overall change 31 kB 31 kB
Client Pages
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 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 lfades/next.js update-basic-auth-implementation-in-examples-ch15325 Change
_buildManifest.js gzip 323 B 323 B
Overall change 323 B 323 B
Serverless bundles
vercel/next.js canary lfades/next.js update-basic-auth-implementation-in-examples-ch15325 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: 11ef918

@lfades lfades merged commit b540054 into vercel:canary Dec 29, 2020
@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
examples Issue/PR related to examples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update basic auth implementation in examples.
3 participants