Switch to Supabase

JWT to Supabase

  1. Set AWS Config

At present, AWS uses a dummy config, so we don't need to change anything, but in actual implementation, you need to set poolId and appClientId in the following file. For more details, refer to Supabase here:https://supabase.com/

.env
...

## Supabase

VITE_SUPABASE_URL=
VITE_SUPABASE_ANON_KEY=

...
  1. Change Config

src\config.js
export const APP_AUTH: AuthProvider = AuthProvider.SUPABASE;
  1. Change AuthProvider

Comment out another provider in the following file and uncomment the Supabase one.

src/App.tsx
import { SupabseProvider as AuthProvider } from 'contexts/SupabaseContext';
  1. Change Auth Hooks

Comment out another context in the following file and uncomment the Supabase one.

src/hooks/useAuth.ts
import AuthContext from 'contexts/SupabaseContext';

Last updated