This guide explains how to sign in to the Deep Dive Brewing Co admin dashboard, how authorization is decided, and how to fix common login problems.
- Use a modern browser.
- Make sure popups are allowed for
deepdivebrewing.com. - Make sure cookies and third-party storage are not blocked.
- Have the Google account ready that has been invited by a superadmin, or the configured bootstrap superadmin account.
- Open https://deepdivebrewing.com/admin.
- Click Sign in with Google.
- A Google popup appears. Choose the authorized Google account.
- The popup closes and the dashboard loads.
If you are the bootstrap superadmin and it is your first sign-in, the dashboard shows Complete Superadmin Setup. Click it — the dashboard refreshes your access and loads automatically.
If you were invited but have not accepted the invitation yet, the dashboard shows Accept Invitation. Click it — the dashboard refreshes your session and loads automatically, with no sign-out needed. If the automatic refresh cannot confirm access, a Refresh admin access retry appears; signing out and back in remains a fallback.
- The site verifies your Google ID token with the Firebase Admin SDK.
- The server reads your Firebase custom claims. A valid admin has claims like
{ admin: true, role: "superadmin" }or{ admin: true, role: "admin" }. - If your claims are valid and your
adminUsersrecord is active with a matching role, the dashboard loads. - If you are signed in but have no admin claim, the server checks whether your account matches the configured bootstrap superadmin email and offers the setup step if appropriate.
- If you are signed in but not authorized, you see a message saying your account is not authorized.
Authorization requires two things to agree, and neither alone is sufficient:
- Firebase custom claims on your ID token —
{ admin: true, role: "admin" | "superadmin" }— carry the role assertion. - An
adminUsersrecord in Firestore for your account that exists, is active, and carries the same role as the claims.
The server APIs and Firebase Security Rules re-check both on every privileged request. Because claims are embedded in the token, they can lag behind a role or status change until the token is refreshed — the live adminUsers record is what makes demotion, disabling, and revocation take effect immediately, since a stale token no longer matches it.
The server uses the Firebase Admin SDK to set claims and create the adminUsers record after verifying:
- The user signed in with Google.
- The email is verified.
- For invitations, the email matches a pending invitation exactly.
- For the bootstrap flow, the email matches the server-only
SUPER_ADMIN_EMAILenvironment variable.
The client UI checks claims to decide which tabs and buttons to show, but the server APIs and Firebase Security Rules enforce the real authorization.
- superadmin — Can manage content, administrators, and site rebuilds, and holds every permission implicitly.
- admin — Can manage content and trigger rebuilds, but cannot open the Access tab or call access-management APIs.
Sensitive areas additionally require an explicit permission granted by a superadmin — for example Take Payments for the payments workspace and QuickBooks & Accounting for the QuickBooks integration. If you open a page you do not have permission for, the app explains what is missing; a superadmin can grant it from the Access tab. See Managing Administrator Access.
Warning: Granting superadmin access gives full control over the website and other administrators. Only invite people you trust.
To grant access:
- Sign in as a superadmin.
- Open the Access tab.
- Enter the email address and choose a role.
- Click Invite.
- Tell the invited person to sign in with that exact Google account and accept the invitation.
To remove access:
- Open the Access tab.
- Find the administrator.
- Click Disable to temporarily block access, or Revoke to permanently remove access.
The bootstrap superadmin account cannot be disabled or revoked through the UI. This prevents accidental lockout.
Firebase Authentication only allows sign-in from registered domains. The production domain deepdivebrewing.com and any Vercel preview domains must be listed in the Firebase Authentication console under Settings > Authorized domains.
If a new preview domain is not authorized, Google sign-in will fail. Add the exact domain to the Firebase console and try again.
The site uses a Content Security Policy (CSP) to protect visitors. Firebase Auth needs the following origins to be permitted:
connect-src—https://*.googleapis.com,https://*.firebaseio.com,https://accounts.google.com,https://apis.google.comframe-src—https://accounts.google.comand the Firebase Auth helper iframe origin
The Firebase Auth helper domain currently used by the project is:
https://deepdivebrewing-web.firebaseapp.com
This domain is derived from the NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN environment variable at build time. It must remain permitted by the site's frame-src CSP while it is used as the Firebase authDomain.
- Popup blockers can prevent the Google sign-in window from opening. Allow popups for
deepdivebrewing.com. - Strict privacy browsers or containers may block the Firebase Auth helper iframe. If this happens, sign-in may fail even though the button is visible.
- Third-party cookie blocking in some browsers can interfere with the Google Identity Services flow.
Click the Sign out button in the dashboard header. This signs you out of Firebase Auth on the site. It does not sign you out of Google entirely.
Custom claims are embedded in the Firebase ID token. If a superadmin changes your role, disables your account, or reactivates it, the server updates your claims and your adminUsers record right away — and enforcement is immediate too, because the record is checked live on every privileged request. A demotion or disable takes effect at once; after a reactivation, an unexpired token whose role still matches the record can resume access without waiting. Sign out and sign back in to get a fresh token that keeps your client session in sync with the current claims. The dashboard will prompt you to do this when needed.
Symptom: You clicked Sign in with Google, but the popup closed before finishing.
Likely causes:
- You closed the popup yourself.
- A popup blocker closed it.
- The browser refused the popup.
Fix:
- Allow popups for
deepdivebrewing.com. - Try signing in again.
- If the popup still closes, open the browser console and report any red error messages to the developer.
Symptom: The sign-in button is visible, but after clicking it nothing happens, or the browser console shows a frame-src violation for deepdivebrewing-web.firebaseapp.com.
Likely cause: The Content-Security-Policy header does not permit the Firebase Auth helper iframe origin.
Fix:
- The
frame-srcdirective innext.config.tsmust include the value ofNEXT_PUBLIC_FIREBASE_AUTH_DOMAINas anhttps://origin. - If the environment variable changes, the site must be rebuilt and redeployed.
- Do not change the policy to
https://*.firebaseapp.com; keep the exact origin.
Symptom: A Firebase error says the domain is not authorized.
Likely cause: The current domain (production or a Vercel preview) is not in Firebase Authentication authorized domains.
Fix:
- Open the Firebase Authentication console.
- Go to Settings > Authorized domains.
- Add the exact domain shown in the browser address bar.
- Try signing in again.
Symptom: The browser shows a warning that a popup was blocked.
Fix:
- Allow popups for
deepdivebrewing.com. - Temporarily disable popup blockers or privacy extensions for this site.
Symptom: You signed in but see an unauthorized email address.
Fix:
- Click Sign out.
- Sign in again and choose the correct Google account.
- If you are signed in to multiple Google accounts, you may need to sign out of Google entirely or use an incognito/private window.
Symptom: The dashboard says your email is signed in but is not authorized, or you accepted an invitation but still see the unauthorized screen.
Likely causes:
- Your custom claim has not been refreshed after a role change or invitation acceptance.
- Your account is disabled.
- Your
adminUsersrecord's role no longer matches the claims in your token — for example, you were demoted and have not re-signed in. The server denies mismatched tokens until you refresh. - You signed in with a different email than the one that was invited.
Fix:
- Sign out and sign back in to refresh your ID token.
- Confirm you are using the exact invited email address.
- Ask a superadmin to check your status in the Access tab.
Symptom: You were logged in before, but now the dashboard shows the sign-in screen.
Likely cause: Firebase Auth sessions can expire, especially after long periods of inactivity or password changes.
Fix:
- Click Sign in with Google again.
- If the issue repeats, clear cookies for
deepdivebrewing.comand sign in fresh.
Symptom: You keep returning to the sign-in screen after successfully signing in.
Likely causes:
- Third-party cookies or storage are blocked.
- The Firebase Auth helper iframe is being blocked.
- A privacy extension is interfering.
Fix:
- Disable privacy extensions for
deepdivebrewing.com. - Allow third-party cookies and storage.
- Try a different browser or an incognito/private window.
- Check the browser console for CSP errors.
If none of these steps resolve the issue, contact the site developer or owner with:
- The exact URL you are visiting.
- The Google account email you are using.
- Any messages shown on screen.
- Any red errors in the browser console.