Commit Graph

4 Commits

Author SHA1 Message Date
Eng Zer Jun 3675453eac chore(examples): replace uuid dependency with crypto.randomUUID (#77901)
Starting from Node.js v14.17.0 and v15.6.0, we can use Node.js's
`randomUUID` function in the crypto module to generate version 4 UUID.

Since Next.js requires Node 18 or newer, we can replace `uuid`
dependency with `crypto.randomUUID`.

Reference:
https://nodejs.org/docs/latest-v18.x/api/crypto.html#cryptorandomuuidoptions

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
2025-04-22 07:24:06 +00:00
Steven 4466ba436b chore(examples): use default prettier for examples/templates (#60530)
## Description
This PR ensures that the default prettier config is used for examples
and templates.

This config is compatible with `prettier@3` as well (upgrading prettier
is bigger change that can be a future PR).

## Changes
- Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will
be needed upgrading to prettier@3)
- Added `examples/.prettierrc.json` with default config (this will
change every example)
- Added `packages/create-next-app/templates/.prettierrc.json` with
default config (this will change every template)

## Related

- Fixes #54402
- Closes #54409
2024-01-11 16:01:44 -07:00
Luis Alvarez D b540054388 Update authentication examples (#19330)
* Updated example readme

* Updated with-passport example

* Updated profile page for with-passport

* Updated with-passport-and-next-connect

* Updated with-magic

* Updated with-magic readme

* Updated with-iron-session

* Updated next version in with-iron-session

Co-authored-by: Lee Robinson <me@leerob.io>
2020-12-29 12:43:47 -05:00
Luis Alvarez D 7d42b07b79 [Example] with-passport (#10529)
* Added basic layout with login page

* Updated styles

* Added form component

* Added signup page

* Added login/signup API endpoints

* Bug fixes

* Set the cookie

* Added logout route

* Added more auth

* Updated signup

* Added profile page

* Added useUser

* Fix link

* Updated redirect path

* Renaming some files

* Added README

* Apply suggestions from Shu

Co-Authored-By: Shu Uesugi <shu@chibicode.com>

* Add useUser to the header

Co-authored-by: Shu Uesugi <shu@chibicode.com>
2020-03-19 11:40:13 -05:00