Skip to content

Function: resolveIdentityMode()

resolveIdentityMode(configured, envKeys, field?): IdentityMode

Resolve a configured mode: explicit config value, then the first non-empty variable among envKeys, then DEFAULT_IDENTITY_MODE.

An unrecognized value throws rather than falling back. Falling back would silently keep serving OBO - and the production AuthenticationError it produces - to exactly the callers the option was set to accommodate, and a typo ("obo", "sp") is the likeliest way to get one.

string | undefined

string | readonly string[]

string = "identity"

IdentityMode