rsnext/examples/authsignal/passwordless-login
JTaylor0196 f7baa56792
update example Deploy button URLs (#48842)
### What?
Updates Deploy button URLs for all listed examples here:
https://github.com/vercel/next.js/tree/canary/examples

### Why?
The Deploy URLs are currently broken and result in a failed clone
attempt on Vercel.

### How?
The URLs have been changed from https://vercel.com/new/git/external?… to
-> https://vercel.com/new/clone?…
(Last updated
[here](8eaabe2fb0)
in 2021)
2023-04-26 13:31:44 -04:00
..
components chore(examples): add Authsignal passwordless example (#41079) 2022-10-01 06:39:38 +02:00
lib chore(examples): add Authsignal passwordless example (#41079) 2022-10-01 06:39:38 +02:00
pages chore(examples): fix lint 2022-10-01 07:12:41 +02:00
public chore(examples): add Authsignal passwordless example (#41079) 2022-10-01 06:39:38 +02:00
.env.local.example chore(examples): add Authsignal passwordless example (#41079) 2022-10-01 06:39:38 +02:00
.gitignore chore(examples): add Authsignal passwordless example (#41079) 2022-10-01 06:39:38 +02:00
next.config.js chore(examples): add Authsignal passwordless example (#41079) 2022-10-01 06:39:38 +02:00
package.json chore(examples): add Authsignal passwordless example (#41079) 2022-10-01 06:39:38 +02:00
README.md update example Deploy button URLs (#48842) 2023-04-26 13:31:44 -04:00
tsconfig.json chore(examples): add Authsignal passwordless example (#41079) 2022-10-01 06:39:38 +02:00

Authsignal Passwordless Login Example

This example shows how to integrate Authsignal with Next.js in order to implement passwordless login using email magic links and server-side redirects.

The login session is managed using cookies. Session data is encrypted using @hapi/iron.

A live version of this example can be found here.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example authsignal/passwordless-login authsignal-passwordless-app
# or
yarn create next-app --example authsignal/passwordless-login authsignal-passwordless-app
# or
pnpm create next-app --example authsignal/passwordless-login authsignal-passwordless-app

Deploy it to the cloud with Vercel (Documentation).

Configuration

Log in to the Authsignal Portal and enable email magic links for your tenant.

Copy the .env.local.example file to .env.local:

cp .env.local.example .env.local

Set AUTHSIGNAL_SECRET as your Authsignal secret key.

The SESSION_TOKEN_SECRET is used to encrypt the session cookie. Set it to a random string of 32 characters.

Notes

To learn more about Authsignal take a look at the API Documentation.