Supabase
Integrating Supabase authentication with Saas UI.
This integration allows you to connect Supabase with the Saas UI auth screens and provider.
Supported authentication strategies are:
- Magic link
- Password
- Social login (Oauth)
Import#
import { createAuthService } from '@saas-ui/auth/services/supabase'
Usage#
If you haven't done so already install @supabase/supabase-js
.
yarn add @supabase/supabase-js
Setup AuthProvider#
import { createClient } from '@supabase/supabase-js'import { AuthProvider } from '@saas-ui/react'import { createAuthService } from '@saas-ui/auth/services/supabase'const supabaseClient = createClient(process.env.SUPABASE_URL,process.env.SUPABASE_KEY)function App({ children }) {return (<SaasProvider><AuthProvider {...createAuthService(supabaseClient)}>{children}</AuthProvider></SaasProvider>)}
That's it! Check the Auth documentation to see how to add authentication screens to your app.
Was this helpful?