Skip to content

Fortified IDDocs

Selector

Configure selector options, presentation groups, last-used preferences, and language overrides in Access.

The Selector authenticator is responsible for presenting a list of authentication options for the user to select from (a "menu").

The selector completes when the user selected authentication option (single authenticator or chain) completes.

Selectors can be nested with other selectors and chains.

Common Authenticator configuration can be found here.

NameDescriptionDefaultMandatory
base_pathThe base path for this authenticator and used to construct the path to the selected authenticator. (see Routing)false
optionsList of options to be presented to the user. A selector without options will block the authentication and therefore at least one option must be present.[]false
groupsPresentation groups with unique IDs, labels and optional ordering. See Groups and presentation.[]false
remember_last_choiceObject containing boolean enabled. Marks the last explicit choice without selecting it. See Last-used choice.{"enabled": false}false
auto_selectTurns off automatic selection if only one option is available.truefalse
auto_completeTurns on automatic authentication completion (flow continues) if no options are available (selector is not displayed).falsefalse
lazy_expiryTurns on automatic re-selection of previously selected option when authenticator has expired (selector is not displayed).
Note! include_expr must be evaluated for this option before reselecting it.
falsefalse
verboseTurns on extended trace logging. Use for troubleshooting only.falsefalse
webroot_dirSee common authenticator documentationweb/authenticator/selectorfalse
reset_on_selected_cancelSet to true when cancel in selectable method should return to the Selector instead of external cancel page from cancel_locationfalsefalse

Configure without groups in Management Center

Section titled “Configure without groups in Management Center”

Both the existing presentation and the new presentation can display a selector without groups. Open the Selector authenticator in Management Center and configure its options as follows. The Existing flat selector and Presentation without groups tabs under Configuration show the corresponding JSON examples.

  1. For every option, set Group to Ungrouped.
  2. For every option, set Presentation to Default (secondary in presentation mode). This removes the explicit presentation value; do not choose Secondary when you want to retain the existing presentation.
  3. Leave the groups list empty. If groups already exist, remove them after assigning all their options to Ungrouped. A group cannot be removed while an option still references it.
  4. Click Update to save the Selector authenticator.

With no configured groups and no explicit option presentation values, the selector retains its existing flat list and header. Remember Last Choice can be enabled independently; it does not switch the selector to the new presentation.

  1. For every option, set Group to Ungrouped.
  2. Leave the groups list empty. When converting a grouped selector, first assign all options to Ungrouped, then remove the groups.
  3. Set Presentation to Primary, Secondary, or Collapsed — More sign-in methods for the options you want to configure. At least one option must have an explicit presentation value to enable the new presentation when there are no groups. Options left at Default (secondary in presentation mode) are displayed as secondary options in this mode.
  4. Click Update to save the Selector authenticator.

The selector displays one list without a group heading, with the new Sign in heading and Choose a sign-in method instruction. Primary and secondary options are directly visible; collapsed options appear when the user expands More sign-in methods. These texts support language overrides as described under Translation keys.

Removing groups alone does not restore the existing presentation: reset Presentation to Default (secondary in presentation mode) for every option as well. Changing presentation or group membership does not change an option's underlying authentication flow (target).

An option represents a user selectable option in the view.

NameDescriptionDefaultMandatory
idConfiguration unique identifier for option.true
targetId of authenticator implementing the option.true
labelOption label. Text or translation key.true
logoLogo URL for option. Preferably monochrome svg logo.false
enabledFlag controlling if the option is enabled or disabled.truefalse
include_exprPredicate expression controlling if option should be included (displayed/selectable) or not.truefalse
group_idReference to a configured group ID. Omitted or null means ungrouped.false
presentationprimary, secondary or collapsed. Independent of the existing type: button|link.secondary when presentation is enabledfalse
orderSort order. In presentation mode, sorts within each presentation class; unspecified values sort last. Without presentation fields, legacy sorting is retained.false

An option is first checked against enabled. If enabled is set to false, the option is excluded before include_expr is evaluated. If enabled is omitted, the option is treated as enabled.

The include predicate is a boolean expression. If the expression is evaluated to true the option is included in the list of available options and displayed to the user.

If filtering results in only one option, automatic selection is performed unless turned off ("auto_select": false). If filtering results in no option an error is displayed unless automatic completion is turned on ("auto_complete": true).

The actual filter is an ECMA-script (JavaScript) that MUST evaluate to true, false or to a boolean function returning true or false.

When reset_on_selected_cancel returns the user to the Selector after cancelling a selected authenticator, option filtering uses the same application context as the first Selector view. This is important when options depend on values such as exports.app_tag.

In an active SAML flow, the selected method's existing Cancel button returns to method selection when that return path is available. The abandoned method's verification and partial results are cleared, while the original SAML request, SP, RelayState, and app_tag remain available for completing the same login with another method. There is no separate Change sign-in method button. Refreshing the initial Selector also preserves the live request's choices.

A terminal cancellation, including a flow that ends through cancel_location or has no Selector return path, clears the SAML request context. A later login must establish its own request context.

// Always exclude
"include_expr": "false"
// Only include if session property 'required_auth_level' is greater than 2
"include_expr": "session.required_auth_level > 2"
// Only include if multi-value property 'roles' contains a specific value (a multi
// value is a JavaScript Array)
"include_expr": "exports.roles.includes('admin')"
// Only include if the entityID of the service equals the configured value.
"include_expr": "str.isEqual(exports.spEntityID, 'https://service.company.org/saml/entityid')"

During expression evaluation data is made available in scopes. A scope is a map (i.e key-values or hash) where values are accessed using a name and plain dot notation.

The following scopes are available:

NameDescriptionCase-insensitive
requestThe current authentication request including HTTP headers and paramsfalse
sessionThe current session.false
stateThe current authentication state.false
exportsExported properties.false
inputAuthenticator inputfalse
subjectCurrent authentication subject (not a scope)false

When a user makes a selection, a redirect will occur to the chosen authenticator. The path to the authenticator is constructed by combining base_path with the selected authenticator's ID (specified in target).

Note that base_path is also used to generate the path for the current authenticator. This is intentional, as all authenticators in a flow must share the same path and session (which is managed by the path).

Groups affect presentation only. Every option has its own stable id; target identifies the authenticator or chain that runs. Different option IDs may share one target, and identical labels may refer to different targets. Labels, group IDs and presentation modes do not grant access or change routing.

Each configured group has the following properties:

Name Description Default Mandatory
id Unique, non-blank group identifier. Yes
label Non-blank display text or translation key. Yes
order 32-bit integer sort order; omitted values sort after explicitly ordered groups. No

Option IDs must be unique across the selector. Every non-null group_id must reference a configured group. Group and option order values must be 32-bit integers. Equal orders retain configuration order.

The server filters options by enabled and include_expr before building the visible groups:

  • Empty groups disappear. With one remaining group, its heading is hidden. With at least two remaining groups, headings are shown.
  • Options without a group are collected in a fallback group after the configured groups. This group counts when deciding whether to show headings. Do not add it to groups or configure a label for it: its fixed translation key is selector.groups.ungrouped (Other sign-in methods, or Övriga inloggningssätt in Swedish).
  • With no configured groups, options share one list without a group heading. Setting presentation still enables primary, secondary and collapsed presentation.
  • If no options remain, existing auto_complete behavior applies; otherwise the no-options message is shown.
Presentation Display and ordering
primary Directly visible, using the existing primary Button variant. Several primary choices are allowed in a group.
secondary Directly visible after primary choices, using the existing secondary Button variant.
collapsed In an independently expandable More sign-in methods section within its group, using the secondary Button variant when shown.

Within each group, primary precedes secondary, then collapsed; order sorts within each class. An omitted presentation becomes secondary when the new presentation mode is enabled. Each expansion button announces its state and its arrow points down when collapsed and up when expanded. More sign-in methods is a presentation control, not an authentication target; it differs from the fallback group heading Other sign-in methods.

Existing theme tokens, button shapes, option logos and image paths are reused. CSS and image overlays continue to apply; no new logo set is required.

Set "remember_last_choice": { "enabled": true } in the Selector's config to enable the Last used marker (Senast använd in Swedish). Omit the setting or use false for enabled to disable it. This setting does not turn on automatic selection.

The frontend stores only the selected option ID in localStorage, isolated by browser origin and selector path. A path ending in /index.html and the equivalent directory path use the same preference. There is no application expiry: the value can survive authentication sessions until browser storage is cleared or an unavailable choice is removed when preferences are read.

  • A server-accepted explicit click or keyboard choice updates the preference before navigation. Successful authentication is not required, so cancelling or failing the subsequent authentication does not undo that choice. Existing native URL options store their explicit click while retaining direct navigation.
  • On a later visit, an available saved option receives the marker. The marker never starts authentication, changes ordering or opens a collapsed section. A collapsed saved choice is marked only when the user opens that section.
  • A stored ID absent from the current available options is ignored and removed when preferences are read. This includes options excluded by filtering. Blocked or unavailable browser storage does not prevent authentication.
  • auto_select and lazy_expiry retain their existing server behavior and do not update the explicit preference. Automatic selection may still bypass the view when only one option is available; in that case the preference is not read or overwritten. Set auto_select to false to show the selector even when only one option is available.

When memory is disabled, the frontend does not read or write the preference. Disabling it does not itself erase an earlier stored value. The feature adds no consent dialog or separate user approval. The enabling organisation is responsible for informing its users according to its requirements. Usernames, personal identifiers, tokens and authentication results are not stored in this preference.

API follows the general conventions of the Fortified Web Authenticator API.

All requests use the HTTP PUT method with Content-Type: application/json, sent to the directory URL the view was loaded from.

MessagePurpose
initFetch the options to present.
actionSelect an option.
cancelCancel the selection.

Init message must be sent before/during the view is loading. Response contains the options that should be presented to the user.

The options array remains flat. groups, presentation_enabled, show_group_labels and remember_last_choice are response metadata, not additional Selector configuration settings. The response below is a synthetic example with two configured groups and an ungrouped option. The server includes only available options and omits internal target, enabled and include_expr fields. With no new presentation configuration, presentation_enabled is false; memory still defaults to disabled. Existing clients can continue to consume the flat options array.

Init may be called while authenticator is in progress under the following circumstances:

  • Callback from selected authenticator
  • Browser reload (user refreshes page)
  • Browser back (user cancels selected authenticator and navigates back)
{
"type" : "init",
"data" : {}
}

The action message is used for selecting an option. Send the available option's id in data.selected, not its target, label or group ID. The server validates the selection and resolves its configured target. Group and preference metadata supplied by the client cannot override that routing.

{
"type" : "action",
"data" : {
"selected" : "<option-id>"
}
}

The complete response message is sent when the authentication has completed. If message contains a location property; view must redirect user agent to the supplied location.

{
"type" : "complete",
"success" : true,
"data" : {
"location" : "<next-location>"
}
}

Cancel is available at any time and is handled as described in Web Authenticator API. The response carries the location to return to.

{
"type" : "cancel"
}

There are a number of logos that comes default. All are located in the assets/svg/ folder

adfs.svg
bankid.svg
certificate.svg
eduid.svg
efos.svg
eidas.svg
fido.svg
fortified_app.svg
freja.svg
globe.svg
google.svg
id_porten.svg
mfa.svg
microsoft.svg
netid.svg
no_bid.svg
otp.svg
passkey.svg
qr_app.svg
sambi.svg
siths.svg
skolfederation.svg
suomi.svg
svenska_pass.svg
sweden_connect.svg
telia.svg
uid_pwd.svg
yubico.svg

Set an option's logo to the image path relative to the selector's web root:

{
"options": [
{
"id": "sambi",
"target": "chain_sambi",
"label": "Sambi",
"logo": "assets/svg/sambi.svg"
}
]
}

For custom logos use overlay method and refer to the image location as above

All displayed text supports the existing language files and overrides: login heading, instruction, group labels, option labels, expansion controls, last-used marker, status and error messages. Group and option label values accept either plain text or translation keys. Existing flat selectors keep using selector.header; presentation mode uses selector.login and selector.choose-method.

Key English default Swedish default
selector.header Choose authentication method Välj inloggningsmetod
selector.login Sign in Logga in
selector.choose-method Choose a sign-in method Välj inloggningssätt
selector.more-methods More sign-in methods Fler inloggningssätt
selector.last-used Last used Senast använd
selector.groups.ungrouped Other sign-in methods Övriga inloggningssätt

For the grouped configuration above, add custom group and option keys through the existing language override mechanism. In <overlay_dir>/assets/ui_config_overrides.json, merge this setting with any existing UI overrides:

{
"localesMergePath": "assets/custom_locales/"
}

Create <overlay_dir>/assets/custom_locales/sv.json, for example:

{
"selector.login": "Logga in",
"selector.choose-method": "Välj inloggningssätt",
"selector.more-methods": "Fler inloggningssätt",
"selector.last-used": "Senast använd",
"selector.groups.ungrouped": "Övriga inloggningssätt",
"selector.groups.resident": "Invånare",
"selector.groups.employee": "Medarbetare",
"selector.options.bankid": "BankID"
}

Provide the corresponding custom keys in en.json and each other supported language. Override values are merged with the built-in locale; unchanged defaults need not be copied. Group IDs and option IDs stay unchanged when labels are translated.

CSS overrides control the existing theme. Overlays supply CSS and images; option logo paths continue to reference those resources. Language changes belong in locale overrides rather than in CSS or the target flow configuration.