• This repository has been archived on 17/Jul/2022
  • Stars
    star
    158
  • Rank 237,131 (Top 5 %)
  • Language
    TypeScript
  • License
    ISC License
  • Created almost 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

next-auth adapters that are maintained by the community to support any database.


NextAuth.js Adapters

Adapter Repository for NextAuth.js

Note: We have migrated the primary nextauthjs/adapters repository to the new nextauthjs/next-auth monorepo. All adapter code can be found there under packages/adapter-* going forward. This repository will be deprecated and most likely archived in the future.

Overview

NextAuth.js is a complete open source authentication solution for Next.js applications.

It is designed from the ground up to support Next.js and Serverless environments.

Getting Started

This repository is a lerna mono-repo which is home to multiple next-auth adapters maintained by the community to support any database.

Adapters

Currently, these are experimental adapters and we would appreciate feedback on them!

The two adapters with the "legacy" suffix are the adapters that currently ship with the core next-auth package. In the future, we will be doing the following two things though:

  1. Removing them from the core package in the short-term
  2. Replacing them with their more up-to-date versions in the medium-term.

Of course, we will announce and document any such changes thoroughly before taking any action. This changes are tenatively slated for v4.0.0.

Adapter Version Docs NPM
typeorm-legacy npm adapters/typeorm @next-auth/typeorm-legacy-adapter
prisma npm adapters/prisma @next-auth/prisma-adapter
prisma-legacy npm adapters/prisma-legacy @next-auth/prisma-legacy-adapter
fauna npm adapters/fauna @next-auth/fauna-adapter
dynamodb npm adapters/dynamodb @next-auth/dynamodb-adapter
firebase npm adapters/firebase @next-auth/firebase-adapter
pouchdb npm adapters/pouchdb @next-auth/pouchdb-adapter

Contributing

Creating a database adapter

If you already have an adapter you would like to add, please create a Pull Request and we will work with you to get it officially supported!

If you would like to also take on the maintenance of the adapter, let us know, and we would be happy to add you as a maintainer to the repository.

TypeScript

We have an official TypeScript Adapter Interface, which should make complying with the existing adapter structure and the common tests, etc. much easier.

Testing

We have developed a basic set of tests that apply to all adapters, i.e. to which all adapters should conform and pass. The code can be found in basic-tests.ts, and specific implementations of which can be found in the /tests subdirectory of each currently available adapter.

All adapter tests should also run against a local instance of the particular database / ORM being tested. For example, for TypeORM we spin up MySQL and PostgreSQL instances via docker, seed them, and execute the test suite separately against both backends.

Publishing

License

ISC

More Repositories

1

next-auth

Authentication for the Web.
TypeScript
24,344
star
2

next-auth-example

Example showing how to use NextAuth.js with Next.js
TypeScript
3,643
star
3

sveltekit-auth-example

Example showing how to use Auth.js with SvelteKit.
Svelte
274
star
4

next-auth-typescript-example

An example project that shows how to use NextAuth with TypeScript
TypeScript
226
star
5

react-query

React Query wrapper for NextAuth.js session management
JavaScript
137
star
6

next-auth-refresh-token-example

NextAuth.js Refresh Token Example
JavaScript
103
star
7

docs

Official documentation for NextAuth.js
JavaScript
95
star
8

cli

The CLI tool by Auth.js to supercharge your authentication workflows
JavaScript
49
star
9

next-auth-v5-example

TypeScript
39
star
10

next-auth-webauthn

NextAuth.js 2FA with WebAuthn Example
TypeScript
26
star
11

express-auth-example

Example showing how to use Auth.js with Express.
TypeScript
25
star
12

solid-start-auth-example

Example showing how to use Auth.js with SolidStart.
TypeScript
23
star
13

next-auth-gatsby-example

Example showing how to use NextAuth.js with Gatsby
JavaScript
11
star
14

.github

9
star
15

sveltekit-auth-cloudflare

Example on how to use SvelteKit Auth with Cloudflare Pages.
Svelte
7
star
16

authjs-third-party-backend

This repo showcases how to connect third-party services to your Auth.js client, using an OAuth provider
Java
7
star
17

next-auth-behind-proxy

TypeScript
3
star
18

playgrounds

Example Playground Applications for various Auth.js framework clients
TypeScript
3
star
19

next-auth-pages-example

TypeScript
3
star
20

auth-with-proxy

CSS
2
star
21

qwik-auth-example

TypeScript
2
star
22

extend-model-sequelize-adapter-reproduce

TypeScript
1
star
23

github-workers

Certain providers block cloud IPs, so we need self-hosted workers to circumvent this for running tests in GitHub Actions
Dockerfile
1
star