Selector
Configure selector options, presentation groups, last-used preferences, and language overrides in Access.
Introduction
Section titled “Introduction”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.
Configuration
Section titled “Configuration”Common Authenticator configuration can be found here.
| Name | Description | Default | Mandatory |
|---|---|---|---|
base_path | The base path for this authenticator and used to construct the path to the selected authenticator. (see Routing) | false | |
options | List 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 |
groups | Presentation groups with unique IDs, labels and optional ordering. See Groups and presentation. | [] | false |
remember_last_choice | Object containing boolean enabled. Marks the last explicit choice without selecting it. See Last-used choice. | {"enabled": false} | false |
auto_select | Turns off automatic selection if only one option is available. | true | false |
auto_complete | Turns on automatic authentication completion (flow continues) if no options are available (selector is not displayed). | false | false |
lazy_expiry | Turns 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. | false | false |
verbose | Turns on extended trace logging. Use for troubleshooting only. | false | false |
webroot_dir | See common authenticator documentation | web/authenticator/selector | false |
reset_on_selected_cancel | Set to true when cancel in selectable method should return to the Selector instead of external cancel page from cancel_location | false | false |
{ "id" : "select00", "type" : "Selector", "config" : { "base_path" : "/test/authn", "webroot_dir" : "web/authenticator/selector", "auto_select": true, "auto_complete": false, "lazy_expiry": false, "options" : [ { "id" : "option01", "order":1, "target" : "chain01", "label" : "BankID" }, { "id" : "option02", "order":2, "target" : "chain02", "label" : "keys.bankid.selector.label" } ] } }This complete Selector entry references existing authenticator or chain IDs. Configure those targets separately under the same base path. The translation keys are defined in the language override example.
{ "id": "select_grouped", "type": "Selector", "config": { "base_path": "/test/authn", "auto_select": false, "lazy_expiry": false, "groups": [ { "id": "resident", "label": "selector.groups.resident", "order": 1 }, { "id": "employee", "label": "selector.groups.employee", "order": 2 } ], "remember_last_choice": { "enabled": true }, "options": [ { "id": "bankid-resident", "target": "chain_bankid", "label": "selector.options.bankid", "logo": "assets/svg/bankid.svg", "group_id": "resident", "presentation": "primary", "order": 1 }, { "id": "freja-resident", "target": "chain_freja", "label": "Freja eID", "logo": "assets/svg/freja.svg", "group_id": "resident", "presentation": "primary", "order": 2 }, { "id": "efos-employee", "target": "chain_efos", "label": "Efos", "logo": "assets/svg/efos.svg", "group_id": "employee", "presentation": "secondary", "order": 1 }, { "id": "bankid-employee", "target": "chain_bankid", "label": "selector.options.bankid", "logo": "assets/svg/bankid.svg", "group_id": "employee", "presentation": "collapsed", "order": 1 }, { "id": "bankid-other", "target": "chain_bankid_other", "label": "selector.options.bankid", "logo": "assets/svg/bankid.svg", "presentation": "secondary", "order": 1 } ] }}bankid-resident and bankid-employee start the same chain_bankid flow. bankid-other has the same displayed BankID label but starts chain_bankid_other. It has no group_id, so it appears in the fallback group after the two configured groups. The resident group has two primary choices. Memory is explicitly enabled in this example; its default is disabled.
Use presentation modes without defining named groups. No group heading is displayed; the collapsed option appears only after opening More sign-in methods.
{ "id": "select_presented", "type": "Selector", "config": { "base_path": "/test/authn", "auto_select": false, "options": [ { "id": "bankid", "target": "chain_bankid", "label": "BankID", "presentation": "primary" }, { "id": "freja", "target": "chain_freja", "label": "Freja eID", "presentation": "secondary" }, { "id": "efos", "target": "chain_efos", "label": "Efos", "presentation": "collapsed" } ] }}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.
Keep the existing presentation
Section titled “Keep the existing presentation”- For every option, set Group to Ungrouped.
- For every option, set Presentation to Default (secondary in presentation mode). This removes the explicit
presentationvalue; do not choose Secondary when you want to retain the existing presentation. - 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.
- 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.
Use the new presentation without groups
Section titled “Use the new presentation without groups”- For every option, set Group to Ungrouped.
- Leave the groups list empty. When converting a grouped selector, first assign all options to Ungrouped, then remove the groups.
- 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.
- 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).
Option
Section titled “Option”An option represents a user selectable option in the view.
| Name | Description | Default | Mandatory |
|---|---|---|---|
id | Configuration unique identifier for option. | true | |
target | Id of authenticator implementing the option. | true | |
label | Option label. Text or translation key. | true | |
logo | Logo URL for option. Preferably monochrome svg logo. | false | |
enabled | Flag controlling if the option is enabled or disabled. | true | false |
include_expr | Predicate expression controlling if option should be included (displayed/selectable) or not. | true | false |
group_id | Reference to a configured group ID. Omitted or null means ungrouped. | false | |
presentation | primary, secondary or collapsed. Independent of the existing type: button|link. | secondary when presentation is enabled | false |
order | Sort order. In presentation mode, sorts within each presentation class; unspecified values sort last. Without presentation fields, legacy sorting is retained. | false |
{"options" : [ { "id" : "<option-id>", "target" : "<authenticator-id>", "label" : "<option-text-or-translation-key>", "logo" : "<option-logo>" }, { "id" : "<disabled-option-id>", "target" : "<authenticator-id>", "label" : "<option-text-or-translation-key>", "enabled" : false } ]}Option filtering
Section titled “Option filtering”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:
| Name | Description | Case-insensitive |
|---|---|---|
request | The current authentication request including HTTP headers and params | false |
session | The current session. | false |
state | The current authentication state. | false |
exports | Exported properties. | false |
input | Authenticator input | false |
subject | Current authentication subject (not a scope) | false |
Routing
Section titled “Routing”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 and presentation
Section titled “Groups and presentation”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
groupsor configure a label for it: its fixed translation key isselector.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
presentationstill enables primary, secondary and collapsed presentation. - If no options remain, existing
auto_completebehavior 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.
Last-used choice
Section titled “Last-used choice”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_selectandlazy_expiryretain 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. Setauto_selecttofalseto 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.
General requirements
Section titled “General requirements”All requests use the HTTP PUT method with Content-Type: application/json, sent to the directory URL the view was loaded from.
Messages
Section titled “Messages”| Message | Purpose |
|---|---|
init | Fetch the options to present. |
action | Select an option. |
cancel | Cancel the selection. |
Init (request+response)
Section titled “Init (request+response)”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" : {}}{ "success": true, "type": "init", "data": { "auto_select": false, "options": [ { "id": "resident", "label": "BankID", "group_id": "resident", "presentation": "primary" }, { "id": "employee", "label": "BankID", "group_id": "employee", "presentation": "collapsed" }, { "id": "plain", "label": "BankID", "presentation": "secondary" } ], "presentation_enabled": true, "groups": [ { "id": "resident", "label": "selector.groups.resident", "order": 1 }, { "id": "employee", "label": "selector.groups.employee", "order": 2 }, { "id": null, "label": "selector.groups.ungrouped", "fallback": true } ], "show_group_labels": true, "remember_last_choice": { "enabled": true } }, "method_selection_available": false}| Reason | Description |
|---|---|
| Selected authenticator failed | The selected authenticator failed. |
| Unknown status: <status> | The selected authenticator has an unknown status (Not PENDING, IN_PROGRESS, COMPLETED or FAILED) |
| Invalid status: <status> | Protocol error. Init called when authenticator is not in status PENDING or IN_PROGRESS. |
Action (request+response)
Section titled “Action (request+response)”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>" }}{ "type" : "action", "success" : true, "data" : { "location" : "<path-to-selected-authenticator>" }}| Reason | Description |
|---|---|
| Invalid option: <option-id> | An invalid option-id was supplied. Only option-ids from init are valid. |
| Invalid state | Protocol error. Operation is called in an invalid state, for example if action is called before init. |
Complete (response)
Section titled “Complete (response)”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 (request+response)
Section titled “Cancel (request+response)”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"}Option logos
Section titled “Option logos”There are a number of logos that comes default. All are located in the assets/svg/ folder
adfs.svgbankid.svgcertificate.svgeduid.svgefos.svgeidas.svgfido.svgfortified_app.svgfreja.svgglobe.svggoogle.svgid_porten.svgmfa.svgmicrosoft.svgnetid.svgno_bid.svgotp.svgpasskey.svgqr_app.svgsambi.svgsiths.svgskolfederation.svgsuomi.svgsvenska_pass.svgsweden_connect.svgtelia.svguid_pwd.svgyubico.svgExample
Section titled “Example”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" } ]}Custom logos
Section titled “Custom logos”For custom logos use overlay method and refer to the image location as above
Translation keys
Section titled “Translation keys”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.