All Cadets

Platform reference

JROTC and ROTC domains, branding, and session handoff

How one application follows the unit’s program domain and rebuilds a Firebase session safely when a user began on the wrong origin.

Everyone13 minute readSign-in and cross-domain handoffVerified against the live product · August 2026

Guide at a glance

How to use this guide

Start with

Use this as a precise reference. Check the named surface, role, domain, and availability state against your situation.

By the end

You can distinguish current behavior from planned capability and know which product surface owns the action.

  1. 1.One application, program-specific origins
  2. 2.A redirect alone cannot carry sign-in
  3. 3.Failure is non-fatal
  4. 4.Support and safeguarding are exempt

One application, program-specific origins

JROTC and ROTC use separate organization origins. The unit’s domain field decides the correct destination and branding; branch configuration decides ranks, awards, and echelon vocabulary.

The same codebase renders both experiences.

A redirect alone cannot carry sign-in

Firebase Auth persistence is scoped to the browser origin. A person who signs in on one program origin is not automatically signed in on the other.

The application therefore requests a short-lived custom handoff token and exchanges it on the target origin. The token travels in the URL fragment and is removed from browser history after use.

Failure is non-fatal

If a handoff token cannot be issued, the user stays on the current origin and the application still follows the unit’s stored branding and data.

The system also records one handoff attempt per origin in session storage to prevent a configuration disagreement from becoming a redirect loop.

Support and safeguarding are exempt

Public support and safeguarding routes are not interrupted for cosmetic domain alignment. Someone reporting a concern must not be bounced between origins mid-report.

The documentation domain is likewise a separate public origin and never carries an organization session.

Key terms in this guide

Change request
A proposed official change that keeps the current and proposed values available for review.
Scope
The records or formations within which a permission, report, tool, or action applies.
Change history
The attributable sequence of previous values, new values, actors, and times behind official changes.

Continue reading