Example using Lucia and Supabase adapter.
npm install
npm run dev
SUPABASE_URL=""
SUPABSE_SECRET="" # service_role
# something long (> 64 char) and random
VITE_LUCIA_SECRET=""
Create 2 tables:
user
refresh_token
Make sure to enable row-level security for all of them.
column name | type | relations | nullable | unique | identity |
---|---|---|---|---|---|
id | varchar | true | true | ||
identifier_token | varchar | true | |||
hashed_password | varchar | true | |||
username |
varchar | true |
column name | type | relations | nullable | unique | identity |
---|---|---|---|---|---|
refresh_token | varchar | true | |||
user_id | varchar | user.id |