Supabase Email & Password
Shipped supports Supabase Email and Password authentication.
It is an authentication method that requires the user to provide a valid email and create a password (at least 6 characters in length).
When the credentials are provided, Supabase sends a confirmation email to the inbox of the user.
The email contains a link. When the user clicks on that link, the account is correctly confirmed, and the user can use the credentials to log in to your website.
If you need Supabase Auth, move to the supabase
branch of the Shipped git repository.
All the code changes described below are already applied there.
Use this command in the terminal to move to the branch:
git checkout supabase
Add Email and Password auth
To use Email and Password authentication using Supabase, you need to apply a couple of changes.
Update the file
src/app/signup/page.tsx
Replace:
with:
Update the file
src/app/login/page.tsx
Replace:
with:
The configuration is complete. You now have both the signup and login pages with email and password prompts, plus the Google sign-in by default.
Authenticated users
To identify logged-in users in a client component ("use client"
on top of the component file), use this code:
Last updated