Skip to content

kyen99/next-auth-adapter-airtable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airtable Next Auth Adapter

This is a next-auth database adapter for Airtable

Status

This is experimental. Use at your own risk. I've tested this with Google and Email providers. If you run across a configuration that doesn't work, open an issue here with your [...nextauth].js file.

There is test coverage using the standard basic-tests.ts set used for the adapters in the official repo.

Airtable schema

Clone this base in Airtable: https://airtable.com/shr16Xd8glUk90c4P

ENV vars

Add your apiKey and the baseId of the cloned base to .env:

AIRTABLE_API_KEY=keyXXXXXXXXXXXXXX // From your account page
AIRTABLE_BASE_ID=appXXXXXXXXXXXXXX // e.g. https://airtable.com/baseId/something/somethingelse/

Usage

import NextAuth from 'next-auth'
import AirtableAdapter from 'next-auth-adapter-airtable'

export default NextAuth({
  providers: [
    ...providers
  ],
  adapter: AirtableAdapter({
    apiKey: process.env.AIRTABLE_API_KEY,
    baseId: process.env.AIRTABLE_BASE_ID,
  }),
})

About

Airtable adapter for next-auth

Resources

License

Stars

Watchers

Forks

Packages

No packages published