@quatrain/auth-supabase
v1.2.10
Published
The Supabase Authentication adapter for `@quatrain/auth`.
Readme
@quatrain/auth-supabase
The Supabase Authentication adapter for @quatrain/auth.
Introduction
Supabase Auth provides robust user management based on PostgreSQL Row Level Security. This adapter implements the Quatrain Auth interface to verify Supabase JWTs and manage user sessions.
Installation
npm install @quatrain/auth-supabase @supabase/supabase-js
# or
yarn add @quatrain/auth-supabase @supabase/supabase-jsConfiguration
Initialize the adapter using your Supabase project URL and service role key.
import { Auth } from '@quatrain/auth'
import { SupabaseAuthAdapter } from '@quatrain/auth-supabase'
const supabaseAuth = new SupabaseAuthAdapter({
config: {
url: process.env.SUPABASE_URL,
key: process.env.SUPABASE_SERVICE_ROLE_KEY
}
})
Auth.addAdapter('supabase', supabaseAuth, true)Documentation
For concrete examples and usage guides, please refer to the How-To Guide.
License
AGPL-3.0-only
