@next-auth/supabase-adapter
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published


Supabase Adapter - NextAuth.js

Open Source. Full Stack. Own Your Data.

Build Test Bundle Size @next-auth/supabase-adapter Version

Overview

This is the Supabase Adapter for auth.js. This package can only be used in conjunction with the primary auth.js package. It is not a standalone package.

You can find more Supabase information in the docs at authjs.dev/reference/adapters/supabase.

Getting Started

  1. Install @supabase/supabase-js, next-auth and @next-auth/supabase-adapter.
npm install @supabase/supabase-js next-auth @next-auth/supabase-adapter
  1. Add this adapter to your pages/api/[...nextauth].js next-auth configuration object.
import NextAuth from "next-auth"
import { SupabaseAdapter } from "@next-auth/supabase-adapter"

// For more information on each option (and a full list of options) go to
// https://authjs.dev/reference/configuration/auth-options
export default NextAuth({
  // https://authjs.dev/reference/providers/oauth-builtin
  providers: [
    // ...
  ],
  adapter: SupabaseAdapter({
    url: process.env.NEXT_PUBLIC_SUPABASE_URL,
    secret: process.env.SUPABASE_SERVICE_ROLE_KEY,
  }),
  // ...
})

Contributing

We're open to all community contributions! If you'd like to contribute in any way, please read our Contributing Guide.

License

ISC

/@next-auth/supabase-adapter/

    Package Sidebar

    Install

    npm i @next-auth/supabase-adapter

    Homepage

    authjs.dev

    Weekly Downloads

    886

    Version

    0.2.1

    License

    ISC

    Unpacked Size

    34.1 kB

    Total Files

    18

    Last publish

    Collaborators

    • thvu
    • ndom91
    • balazsorban
    • iaincollins