Skip to content

app.active_org_selections

TableRow level security on

The org each sign-in chose in the context switcher (ADR 0007 item 1). The custom access token hook copies it into the org_id claim while the membership is active. Written only through app.set_active_org.

Primary key: user_id

Columns of app.active_org_selections
ColumnTypeNullableDescription
user_iduuidNoSign-in (auth.users.id) that made the choice; one row per sign-in.References auth.users.id
org_iduuidNoChosen org. A choice whose membership ended stays here but no longer reaches the token.References app.organizations.id
selected_attimestamp with time zoneNoWhen the org was last chosen.