Factors

Factors

Factors are the options users can use to login with, i.e. demonstrate ownership of an account. Their use is mandatory as they sit at the heart of what Quasr offers. In technical terms factors are authentication methods. Each factor is designed with security, privacy and user experience as crucial requirements.

Before we start let's tackle some important terminology:

  • Factor - When we refer to a factor we generally refer to a factor configuration and not to a specific instance itself. For example the configuration of a username factor. Sometimes we do use the term as well for a specific instantiation.
  • Enrollment - When we refer to an enrollment we refer to an individual instance of a factor. For example a specific username or password. We always use this term to refer to a specific instance.

The factors for a tenant can be retrieved via either the Admin UI, Management API, Agent API or Authentication API.

  1. 1The number of signups and logins with the factor this month
  2. 2Only for internal accounts, e.g. the client secret of your machine-to-machine applications
  3. 3Users can't enroll themselves: only an admin or the system creates its enrollments
  4. 4Captures data (Capture Input or Capture Claims) that sources can store as attributes

Types

Quasr offers following factors, rated on security, privacy, user experience and popularity with users. Factors rated Custom depend on how you configure them. Click a factor for more details.

Name Click to sort ascendingType Click to sort ascendingSecurity Click to sort ascendingPrivacy Click to sort ascendingExperience Click to sort ascendingPopularity Click to sort ascending
UsernameSecret
EmailSecret
Phone NumberSecret
PasswordSecret
SecretSecret
One-Time PasswordOne-Time Password (OTP)
Email One-Time PasswordOne-Time Password (OTP)
Phone One-Time PasswordOne-Time Password (OTP)
Authenticator AppAuthenticator App (TOTP)
Personal TokenToken (JWT)
Private KeyToken (JWT)
Hosted Key SetToken (JWT)
QuasrIdentity Provider (IDP)
GoogleIdentity Provider (IDP)
AppleIdentity Provider (IDP)
MicrosoftIdentity Provider (IDP)
FacebookIdentity Provider (IDP)
LinkedInIdentity Provider (IDP)
SlackIdentity Provider (IDP)
GitHubIdentity Provider (IDP)
DiscordIdentity Provider (IDP)
OpenID ConnectIdentity Provider (IDP)

Configuration

All factors have following general configuration options:

  • Label (label: string) - Textual label returned in the Authentication API and used on the Login UI and Account UI.
  • Status (status: string) - The current status of the factor. If disabled, the factor can't be used and all enrollments will be locked.
  • Score (score: number) - Each factor will have a score indicating what (security) score a user gains when successfully passing the factor using the Authentication API during signup or login. This allows reflecting security by individual factors as well as multi-factor / step-up authentication (MFA) by passing more factors.
  • Unique (config.unique: boolean) - This indicates whether each enrollment for the factor must be unique. So if for example the username factor is unique then only 1 account can have a specific username. Only unique factors can be used for an initial login if the user is not yet known.
  • Internal (config.internal: boolean) - This indicates that the factor must only be used by internal accounts. For example, a login with Microsoft using the corporate IDP.
  • Restricted (config.restricted: boolean) - This indicates that the factor can only be created by the system or an admin. Hence not allowing accounts to create their own. For example an email username factor whose enrollments are created from the validated email address, see Attributes — Email Setup.
  • Regex (config.regex: string) - Regular expression (regex) to which (initial) input to the factor must match. Factors requiring multiple steps will indicate the regex for the next input in the previous response.
  • Case Sensitive (config.case_sensitive: boolean) - This indicates whether input must be considered case sensitive.
  • Require Validation (config.require_validation_for_enablement: boolean) - This indicates whether any enrollment must first be validated before it gets enabled. For some factors this will be mandatory as intrinsic to its working, for others this will be optional. Please note that some validation could also be done in the frontend like asking for the password twice to avoid typos.
  • Expires In (config.expires_in: string) - Only relevant if validation is required. Time indication for how long users have to validate an enrollment for enablement.
  • Allow Pending (config.allow_pending: boolean) - Only relevant if validation is required. This indicates whether the factor can be used before enablement as part of a non-unique login, i.e. by using the enrollment ID directly. This setting can be useful if users need to perform validation in another screen without context.

Score

The score of a factor is very important and should reflect its security. When a user successfully passes a factor they'll accumulate its score in their session. The session score is then used to evaluate if a user has sufficiently authenticated in order to gain application access (scope) or give consent (legal). The latter are represented by controls which also have scores indicating what score is required in order to pass them (grant/consent).

For example say a user passes a username and password factor, respectively having scores 1 and 2. This means the user now has a score of 3. If the user wants to access their account and that control (scope) has a score of 3 then the user will get access. But if the user wants to access sensitive information and that control (scope) has a score of 4 then the user will not get access unless more factors are passed, i.e. step-up or multi-factor authentication (MFA).

Username (1) Password (2) One-Time Password (2) Session Profile Access (3) Sensitive Access (4)
0
1
2
2
3
3
4
5

Setup

Factors can be created via either the Admin UI, the Management API or the Agent API.

  1. 1Fixed after creation: only unique factors can be used as first factor of a login or signup
  2. 2The minimum strength of a new password

Factors can be updated via either the Admin UI, the Management API or the Agent API.

  1. 1Enrollments are only created by an admin or the system, here from the validated email address
  2. 2New enrollments stay pending until validated, and are deleted if not validated within Expires In
  3. 3How long an enrollment stays locked after Max Attempts consecutive failures, see Locking

Enrollments

Accounts can enroll or be enrolled to available factors via either the Login UI, Account UI, Admin UI, Management API, Agent API or Authentication API.

  • Login UI - Users enroll in the factors they choose when signing up, e.g. an email OTP, a password or an authenticator app.
  • Account UI - Signed-in users add or remove enrollments themselves in the Factors screen, e.g. a new authenticator app.
  • Admin UI - Admins create enrollments for applications and internal users in the Factors tab of the account. See Users — Enrollments.
  • Management API - The createEnrollment operation, see Management API below.
  • Agent API - The create-enrollment tool. See Agent API.
  • Authentication API - Factors passed during a signup create enrollments, see Login & Signup below.

All enrollments have following general configuration options:

  • Label (label: string) - Textual label returned in the Authentication API and used on the Login UI and Account UI.
  • Status (status: string) - The current status of the enrollment. If disabled, the enrollment can't be used.

The enrollments for an account can be retrieved via either the Admin UI, Account UI, Management API, Agent API and Authentication API.

  • Admin UI - In the Admin UI the enrollments for an account are shown in the Factors tab at https://{tenant_id}.admin.quasr.io/accounts/{account_id}/factors.
  • Account UI - In the Account UI the enrollments of the user are shown in the Factors screen:
  • Management API - In the Management API the listEnrollments operation can be used at https://{tenant_id}.api.quasr.io/graphql. See: https://documenter.getpostman.com/view/18129777/UVXgMHEv#775df3b6-bb93-4e1f-8c2c-103115449a8f.
  • Agent API - In the Agent API the list-enrollments, get-enrollment or search-enrollments tool can be used. See Agent API.
  • Authentication API - In the Authentication API the available enrollments can be retrieved at https://{tenant_id}.api.quasr.io/factors by adding a session token as bearer token in the Authorization header (i.e. Bearer {session_token}) which gives different responses depending on the mode:
    • Login - The available enrollments for the user to continue login. Enrollments of used factors are already filtered out of the response.
    • Signup - The available factors and pending enrollments for the user to continue signup. Used factors are already filtered out of the response.
  1. 1A pending enrollment is deleted if the user doesn't validate it before this time
  2. 2For external users admins can only disable or delete enrollments, not change them
  1. 1An enrollment of a restricted factor: the user can't disable or delete it, only an admin or the system can

Admins can also search the enrollments of a factor by value, e.g. to find the user with a given email address. See Users — Enrollments.

Authentication API

Your Login UI (or any other front-end) signs users up and logs them in with the factors endpoint of the Authentication API, one factor at a time. The Management API is used to manage enrollments afterwards, e.g. in an account page. Each factor page shows the exact steps for that factor; the mechanics they share are explained below.

Requests

Factors are passed with POST https://{tenant_id}.api.quasr.io/factors, with a body containing exactly 1 factor:

POST /factors HTTP/1.1Host: {tenant_id}.api.quasr.ioAuthorization: Bearer {session_token}Content-Type: application/json [    {        "id": "{factor_id|enrollment_id}",        "input": "{input}",        "capture_input": true,        "capture_claims": true,        "params": {            "{key}": "{value}"        }    }]
  • id (string) - The ID of a factor or of an enrollment, see Login & Signup. Required.
  • input (string) - The value for the factor, e.g. a username, password or code. Some factors generate a value when it's left out.
  • capture_input (boolean) - Whether the input may be captured as attribute by a source. Defaults to true.
  • capture_claims (boolean) - Whether the claims of an identity provider may be captured as attributes. Defaults to true.
  • params (object) - Up to 5 custom values (of up to 100 characters) passed to extensions, see OTP.

Except for the first factor of a login, requests contain the session token as bearer token in the Authorization header.

Responses

Processed requests return HTTP status 200 with a result:

  • SUCCESS - The factor is passed. The response contains a new session token, the accumulated score of the session (session_score) and its expiry (session_exp, Unix timestamp). Always continue with the new session token, as the previous one is revoked.
  • PENDING - Another step is needed, e.g. entering the code that was sent. The feedback explains why (cause) and contains the details for the next step, such as the enrollment_id to send it to and a regex the input must match.
  • FAILED - The factor isn't passed, e.g. because the input is incorrect (INCORRECT_INPUT). Failed attempts count towards locking the enrollment.
{    "result": "SUCCESS",    "feedback": {        "cause": "",        "enrollment_id": "{enrollment_id}"    },    "account_id": "{account_id}",    "session_token": "{session_token}",    "session_score": 3,    "session_exp": 1767225600}

A pending or failed response contains no session token; the current session token remains valid. Invalid requests, e.g. a factor which can't be used at this point or was already used in the session, return HTTP status 400:

{    "error": "INVALID_PARAMETER",    "detail": {        "parameter": "body[?].id"    }}
Login & Signup
  • Login - The first factor is sent without session token, with the ID of a unique factor (e.g. username or email) whose input identifies the account. Its response contains a session token for the account and whether it's an internal account (internal: boolean), e.g. for the Login UI to switch to internal mode. The following factors are sent with the session token, using the ID of the account's enrollments, which GET https://{tenant_id}.api.quasr.io/factors returns with the session token.
  • Signup - A signup starts with POST https://{tenant_id}.api.quasr.io/controls?client_id={client_id}, which accepts the controls (e.g. terms) of the application and creates a pending account. Its response contains a signup session token. Factors are then sent with the ID of the factor, which creates an enrollment, and pending enrollments are completed with the ID of the enrollment. An invited user uses their invite token as session token instead.

Once the session score is high enough for the application, the session is exchanged for a consent token with POST https://{tenant_id}.api.quasr.io/controls?client_id={client_id}, and the user is redirected back to the authorization endpoint. See Applications — Browser.

Management API

Signed-in users can add enrollments themselves with the createEnrollment operation of the Management API (create-enrollment tool of the Agent API), and complete a pending enrollment with updateEnrollment, passing the code or value as input:

mutation {    createEnrollment(input: {        account: "{account_id}",        factor: "{factor_id}",        subtype: "{subtype}",        input: "{input}",        status: ENABLED    }) {        id        status        output        expires_at    }}

Locking

To protect against brute-force and credential-stuffing attacks each enrollment keeps track of its consecutive failed or pending validation attempts. Once this count reaches the maximum allowed attempts the enrollment is automatically locked (status: LOCKED) and can't be used to authenticate anymore, regardless of whether the request originates from the account or an admin. A successful validation resets the count back to zero.

When a request refers to an enrollment directly, its attempt is counted the moment it's made, before the input is checked, so the maximum allowed attempts is strictly enforced, also when many attempts are made in parallel. When a request refers to a unique factor instead (the enrollment is looked up from the input, e.g. a login with an Identity Provider), the attempt is counted right after the input is checked. Requesting a One-Time Password (OTP) for a unique factor is the exception: that attempt is counted strictly too, before the OTP is sent.

A locked enrollment automatically unlocks itself after a set period, restoring it to whichever status it had before (ENABLED or PENDING).

  1. 1Locked after 5 consecutive failed attempts: it unlocks itself after 5 minutes, and can't be re-enabled manually

Disabling a factor also locks all of its enrollments, see Discontinue below. In that case enrollments are restored once the factor is re-enabled instead of after the auto-unlock period.

Discontinue

If you want to discontinue a factor please take uttermost care that your users have sufficient other factors available and already enrolled in order to still gain access. If you disable a factor all enrollments will be locked and upon re-enabling the factor all previous states will be restored. If you delete a factor all enrollments will also be permanently deleted.

Factors can be disabled by updating the factor via either the Admin UI, the Management API or the Agent API and setting the status to DISABLED.

Factors can be deleted via either the Admin UI, the Management API or the Agent API.

  • Admin UI - In the Admin UI click on the Delete button (in-row right) in the Factors screen or go to https://{tenant_id}.admin.quasr.io/factors/{factor_id} and click on the Delete button (right-lower corner).
  • Management API - In the Management API the deleteFactor operation can be used at https://documenter.getpostman.com/view/18129777/UVXgMHEv#3dec7801-1f54-4368-b96b-c4768cd4fc1a.
  • Agent API - In the Agent API the delete-factor tool can be used. See Agent API.
2026.11.22 | © Copyright 2026 Quasr BV