A demo using Auth0 passwordless authentication with NextJS
This repository has been archived on 2026-03-21. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • TypeScript 95.1%
  • CSS 2.8%
  • JavaScript 1.1%
  • Shell 1%
Find a file
Riccardo Senica bd07277b0a
Merge pull request #1 from RiccardoSenica/dependabot/npm_and_yarn/npm_and_yarn-32d4a154c8
build(deps): bump the npm_and_yarn group across 1 directory with 2 updates
2024-12-21 18:45:19 +01:00
.husky ci: add base code and tools 2024-06-20 23:47:43 +02:00
.vscode feat: add Auth0 passwordless login 2024-06-25 21:50:16 +02:00
app feat: add auth0 middleware 2024-07-08 11:49:46 +02:00
components feat: add index and create customer form 2024-07-07 22:52:00 +02:00
contexts feat: attempt to fix the crud with auth 2024-07-07 17:47:57 +02:00
hooks feat: attempt to fix the crud with auth 2024-07-07 17:47:57 +02:00
prisma feat: attempt to fix the crud with auth 2024-07-07 17:47:57 +02:00
public ci: add base code and tools 2024-06-20 23:47:43 +02:00
utils style: add styling for pages and forms 2024-07-08 10:47:54 +02:00
.env.example feat: attempt to register new user 2024-06-26 18:49:28 +02:00
.eslintrc copy.json ci: add base code and tools 2024-06-20 23:47:43 +02:00
.eslintrc.json ci: add base code and tools 2024-06-20 23:47:43 +02:00
.gitignore ci: add base code and tools 2024-06-20 23:47:43 +02:00
.prettierrc ci: add base code and tools 2024-06-20 23:47:43 +02:00
.yarnrc.yml ci: add base code and tools 2024-06-20 23:47:43 +02:00
commitlint.config.ts ci: add base code and tools 2024-06-20 23:47:43 +02:00
docker-compose.yml docs: updated documentation and scripts 2024-07-08 12:16:05 +02:00
LICENSE Initial commit 2024-06-20 23:42:28 +02:00
middleware.ts feat: add auth0 middleware 2024-07-08 11:49:46 +02:00
next.config.mjs ci: add some configs 2024-06-21 00:28:14 +02:00
package-lock.json build(deps): bump the npm_and_yarn group across 1 directory with 2 updates 2024-10-15 21:25:33 +00:00
package.json build(deps): bump the npm_and_yarn group across 1 directory with 2 updates 2024-10-15 21:25:33 +00:00
postcss.config.mjs ci: add base code and tools 2024-06-20 23:47:43 +02:00
README.md docs: updated documentation and scripts 2024-07-08 12:16:05 +02:00
tailwind.config.ts ci: add base code and tools 2024-06-20 23:47:43 +02:00
tsconfig.json feat: attempt to fix the crud with auth 2024-07-07 17:47:57 +02:00
vercel.json ci: add some configs 2024-06-21 00:28:14 +02:00
yarn.lock build(deps): bump the npm_and_yarn group across 1 directory with 2 updates 2024-10-15 21:25:33 +00:00

Auth0 demo

Commands

Install dependencies

yarn

Run Postgres on Docker

docker-compose up

Run Prisma migrations

yarn prisma:migrate

Generate Prisma client

yarn prisma:generate

Reset Prisma database

yarn db:reset

Auth0 Webhook

Auth0 Flow to register new users

const axios = require('axios');

exports.onExecutePostUserRegistration = async (event) => {
  await axios.post(event.secrets.WEBHOOK_URL, { email: event.user.email }, {
    headers: {
      'Authorization': `Bearer ${event.secrets.AUTH0_API_SECRET_KEY}`,
      'Content-Type': 'application/json'
    }
  });
};

Add the following secrets to your Flow:

  • WEBHOOK_URL: The URL of your webhook.
  • AUTH0_API_SECRET_KEY: The Auth0 API secret key.