Manage Admin Auth
Manage access to your guestbook admin dashboard.
Managing Users
Allow Admin Users
In the event you want to allow more users to manage your guestbook, you can allow-list their Google accounts as admin users.
Run the following command in your terminal to allow-list a Google account as your admin user:
npx y2k-guestbook allow-admin example@gmail.com
Revoke Admin Users
Run the following command in your terminal to revoke admin access from a Google account:
npx y2k-guestbook delete-admin example@gmail.com
Configure Unauthorized Access Error
If you want to customize the error message that is displayed to users who are not authorized to access the admin dashboard after they attempted to sign in, you can do so by editing the hardcoded message in AdminAuthErrorOverlay.tsx:
<h2 id="admin-auth-error-title" className="admin-auth-error-title">
Oh no!
</h2>
<p id="admin-auth-error-body" className="admin-auth-error-body">
The Google account you used to sign in isn't an administrator.
</p>
<button type="button" className="admin-auth-error-ok" onClick={dismiss}>
Close
</button>
Publish Admin Auth Client
Log in to your Google Cloud console and select your project:
-
In the left sidebar, click APIs & Services, then select OAuth consent screen.
-
Click Branding and enter your:
- App name — This will be displayed instead of your generic Supabase project URL.
- User support email — This will be displayed in the "Contact us" link in the Google OAuth consent screen.
-
Under App domain, enter:
-
Application home page — The URL of your guestbook application.
-
Application privacy policy link — The URL of your guestbook's privacy policy.
-
Application terms of service link — The URL of your guestbook's terms of service.
-
-
Under Authorized domains, enter any Authorized domains # where you intend to serve your guestbook application.
-
In Developer contact information, enter your contact email.
-
Click Save.
-
In the left sidebar, click Audience.
-
Under Testing, click Publish app.
-
Click Confirm to publish your client to production.