Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luismendes070/next-auth-express
https://github.com/luismendes070/next-auth-express
2024 api application-platform-interface expressjs menn-test-2024 next-auth vercel vercel-deployment
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/luismendes070/next-auth-express
- Owner: luismendes070
- License: apache-2.0
- Created: 2024-03-20T14:44:17.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-03-20T15:53:32.000Z (8 months ago)
- Last Synced: 2024-05-01T19:35:29.617Z (7 months ago)
- Topics: 2024, api, application-platform-interface, expressjs, menn-test-2024, next-auth, vercel, vercel-deployment
- Language: TypeScript
- Homepage: https://next-auth-express.vercel.app/
- Size: 61.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> The example repository is maintained from a [monorepo](https://github.com/nextauthjs/next-auth/tree/main/apps/examples/express). Pull Requests should be opened against [`nextauthjs/next-auth`](https://github.com/nextauthjs/next-auth).
Express Auth - Example App
Open Source. Full Stack. Own Your Data.
## Overview
This is the official Express Auth example for [Auth.js](https://express.authjs.dev).
## Getting started
You can instantly deploy this example to [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=express-auth-example) by clicking the following button.
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/nextauthjs/express-auth-example&project-name=express-auth-example&repository-name=express-auth-example)
## Environment Variables
Once deployed, kindly ensure you set all [required environment variables](https://authjs.dev/getting-started/deployment#environment-variables) in the `Environment` section of your hosting service.
## Node.js Compatibility
The recommended version of Node.js to use in this example is Node.js v20.0.0.
If you are using a version of Node.js lower than this (for example the minimum supported node version v18.0.0), you may need to enable Web Crypto API via the `--experimental-webcrypto` flag in the `start` and `dev` scripts of your `package.json` file.
Instead of using the experimental flag, you may use the following polyfill:
```ts
// polyfill.cts
globalThis.crypto ??= require("crypto").webcrypto
```And then import it within a top-level file in the application:
```ts
// server.ts
import "./polyfill.cjs"
```