Content
Head over to your site on localhost:3000
- In the navbar, click on
Account
and you will be redirected to the Login Page. - Click
Sign Up
and in the new window, enter your email address and a password (or whatever other authentication you have choosen). - You'll need to verify your email with the code they've sent you. (If you have not setup resend, the email will come from 'noreply@mail.app.supabase.io')
- When you run the app in localhost, there will be a
Admin Button
in the top navigation - but it won't work yet. - Head over to supabase.com, login, select your project, head over to
Table Editor
, selectusers
, and see if created yourself as a user. Now, manually changeis_super_admin
fromFALSE
toTRUE
. This way, your app knows that you are the super admin. Only you with root access to the database can create super admins. - While you are here, copy your own
id
(the uuid in the first cell, with right click on the cell and press 'copy cell content'). Head over toapp/_constants/constants.ts
and enter it as theBOT_USER_ID
. This way activities by a CRON JOB will be associated with your account. (Of course you can also create another user and take their UUID - if you want to have stuff separated and a bit more secure.) - Return to localhost:3000 and click the 'Admin' Button
- Welcome to your Admin Dashboard which should show a lot of 0s and a single 1 under Admins.
In the left side bar, click on 'Activities' and see that there is a new acitivity: The creation of your account!
If you feel clicking a button in the admin area is a bit slow, you are correct. Every button press and function that is triggered will re-check if you are really the admin. The website itself that users will see will load instantly!