Skip to main content
Internal only. This page is for Juno support staff. For user-facing guidance, see Login Issues.

Auth architecture overview

Juno uses Firebase Authentication as the identity layer, with MongoDB storing user records linked by Firebase UID. JWT claims issued on login:
{
  "uid": "<firebase_uid>",
  "tid": "<tenant_id>",
  "role": 1,
  "support": 0,
  "domainRoles": {},
  "actor": null
}
Role values: 1 = Learner, 2 = Instructor, 3 = Manager, 5 = Admin, 6 = Owner, 99 = Blocked Support levels: 0 = none, 2+ = can reset passwords / change roles, 3+ = can create tenants / delete auth, 10 = super

Diagnosis flow

Step 1 — Identify the auth method

Ask the user or check Admin → Users → [User] → Auth Provider:
  • password — email/password via Firebase
  • google.com — Google OAuth
  • linkedin.com — LinkedIn OAuth
  • saml.* — SAML/SSO
The fix path differs by provider. SSO users cannot use the email/password reset flow.

Step 2 — Check Firebase

  1. Open Firebase console → select the correct project (each environment has its own)
  2. Navigate to Authentication → Users
  3. Search for the user’s email
  4. Confirm: user exists, correct tenant, UID matches MongoDB record
Most common misconfiguration: user was created under the wrong tenant. The tid in Firebase custom claims must match the org slug in MongoDB.

Step 3 — Check MongoDB user record

// In MongoDB shell or Compass
db.users.findOne({ email: "user@example.com", tid: "org-slug" })
Key fields to check:
FieldExpectedProblem if wrong
inactivefalsetrue = deactivated, role is effectively 99
role1–699 = blocked, sees nothing after login
tidmatches org slugwrong org = user can’t see org content
firebaseUidmatches Firebase UIDmismatch = JWT claims won’t resolve

Common scenarios

Scenario A: User can’t log in — “email or password incorrect”

  1. Firebase error auth/user-not-found → user doesn’t exist in Firebase for this tenant
    • Check if user exists under a different tenant
    • If yes: either re-invite under correct tenant or update tid
  2. Firebase error auth/wrong-password → user exists but wrong password
    • Have user use Forgot Password flow
    • If reset email doesn’t arrive: check SendGrid delivery logs for bounces/blocks
  3. No Firebase error but login fails → check MongoDB inactive field

Scenario B: Reset email not arriving

  1. Check SendGrid delivery logs → look for bounce, block, or spam report
  2. Verify the email address in Firebase matches exactly (case-sensitive comparison)
  3. Check user’s spam folder
  4. SSO users: they have no Firebase password — they must use SSO. Attempting password reset for an SSO user will appear to succeed but the email won’t work.

Scenario C: User sees blank screen after login

Role 99 or inactive: true — user can authenticate but the app returns no content. To reactivate via Admin UI: Admin → Users → [User] → Actions → Reactivate This updates both MongoDB (inactive: false) and Firebase (re-enables auth). Do not update only one — a sync mismatch causes intermittent failures.

Scenario D: JWT role mismatch (user’s role changed but old role persists)

JWT is issued at login and cached. After a role change:
  • User must log out and back in to get a new JWT with the updated role
  • If impersonation is active, the actor claim in the JWT reflects the impersonator — not a bug

Admin actions reference

ActionWhereEffect
Change RoleAdmin → Users → [User] → EditUpdates MongoDB role
DeactivateAdmin → Users → [User] → DeactivateSets inactive: true, disables Firebase auth
ReactivateAdmin → Users → [User] → ReactivateSets inactive: false, re-enables Firebase auth
Delete User AuthAdmin → Users → [User] → DeleteRemoves Firebase UID — user can re-register with same email
ImpersonateAdmin → Users → [User] → ImpersonateSets actor claim in JWT, logs support action

Support level requirements

ActionMin support level
View user details2
Reset password / change role2
Create tenant / delete auth3
Impersonate any user10
Last modified on March 26, 2026