This is basically an easy to kickoff project with NextJS and Supabase.
(Shout out to those guys, that made the UI template https://github.com/NextAdminHQ/nextjs-admin-dashboard -
I did the integration of Supabase and the implementation of the Auth related stuff)
It has:
- Login page
- Dashboard ready to start editing and kickoff your project
- Login with Google, Magic Link, Anonymous Signin.
- First clone the repo locally
- Make sure you
cd
into the directory - Run the following command to install dependencies
npm i
- If it gives you error, force it
npm i --force
- The above should work.
- Create a .env file
- At the root of the project
- And put the following variables
NEXT_PUBLIC_SUPABASE_URL=your-projects-url-from-supabase
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SITE_URL=http://localhost:3000
- In production, change the SITE_URL accordingly
- Make sure you have created account in Supabase, in order to have all the variables needed to run.
- Once you are done run
npm run dev
to run the project locally.
- Create your account and create the Users table (online you can find guides for that)
- Make sure you enable Email, Google signin and Anonymous Signins (under Authentication/Signin/Ups in the dashboard)
- Make sure you go to Authentication/Emails and you copy paste the following in the field:
<h2>Magic Link</h2>
<p>Follow this link to login:</p>
<p><a href="{{ .SiteURL }}/auth/confirm?token_hash={{ .TokenHash }}&type=email">Log In</a></p>
- For the Google auth you will need to setup client IDs etc. That is something you can see how to do here https://www.youtube.com/watch?v=gAMYk-ls1sQ&t=838s&ab_channel=ArtemKirsanov