This is a next-auth database adapter for Airtable
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.
Clone this base in Airtable: https://airtable.com/shr16Xd8glUk90c4P
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/
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,
}),
})