Skip to content

passageidentity/passage-express-supabase-nextjs

Repository files navigation

Todo example using Passage with Supabase, Nextjs and Auth.js

  • Frontend:
    • Passage - a passwordless authentication platform.
    • Next.js - a React framework for production.
    • Auth.js - Authentication for the web.
    • Tailwind for styling and layout.
    • Supabase.js for user management and realtime data syncing.
  • Backend:
    • app.supabase.com: hosted Postgres database with restful API for usage with Supabase.js.

Build from scratch

1. Create new project

Sign up to Supabase - https://app.supabase.com and create a new project. Wait for your database to start.

2. Get the URL, Anon Key and JWT Secret

Go to the Project Settings (the cog icon), open the API tab, and find your API URL and anon key, you'll need these in the next step.

The anon key is your client-side API key. It allows "anonymous access" to your database, until the user has logged in. Once they have logged in, the keys will switch to the user's own login token. This enables row level security for your data. Read more about this below.

image

NOTE: The service_role key has full access to your data, bypassing any security policies. These keys have to be kept secret and are meant to be used in server environments and never on a client or browser.

4. Setup the Auth.JS Schema

Inside of your project, enter the SQL editor tab and execute the authjs-schema.sql to load the next_auth schema.

expose the next_auth schema within the API settings found here.

3. Setup Database Schema

Inside of your project, enter the SQL editor tab and execute the schema.sql to load the todos schema

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published