Skip to main content

Authentication

Authentication establishes who is making a request; permissions then decide what they may do. Korint gives each tenant its own separate user directory, and every account belongs to exactly one tenant.

This page is the model: the kinds of identity the platform recognises and the order the checks run in. For the mechanics — credentials, the token request, hosts, scopes and CORS — see Authentication in the API reference.


Signing in​

Users sign in with an email and password, or through single sign-on. Social sign-on is available with Google and Apple, and enterprise identity providers can be connected over SAML 2.0 or OpenID Connect (OIDC). The sign-in methods offered depend on the tenant's configuration. Because each tenant has its own directory, accounts are isolated per tenant and a user's session is only valid within their own tenant.

Multi-factor authentication​

A tenant can add a second step to password sign-in: after the password, the user enters a one-time code from an authenticator app or one sent to their phone by SMS. The authentication.mfa object returned by Get public tenant config says which methods the tenant has declared, as the booleans authenticator and sms. That route needs no credentials, so your sign-in screen can read it before anyone has signed in.

The code step belongs to sign-in, which the tenant's user directory runs. Korint's API takes no part in it: it never asks for a code, and it verifies the access token that sign-in produces the same way whether or not a code was asked for. What your front end has to handle:

  • A password sign-in can return a challenge instead of tokens: a code from the authenticator app, a code sent by SMS, or a choice between the two. Sign-in issues the tokens only once the code is accepted, so until then you have no access token to send to Korint for that user. Handle the challenge whenever sign-in returns one, rather than only on tenants whose authentication.mfa enables a method.
  • Single sign-on adds no code step. A user who signs in through Google, Apple or an enterprise identity provider authenticates at that provider and is not asked for the tenant's code; any second factor is the provider's.
  • Setting a method up goes through the user directory, not Korint's API. Once the user is signed in, registering an authenticator app or choosing a preferred method is authorised with the access token from password sign-in. Depending on the tenant's setting, sign-in can also ask a user who has no method yet to set one up before it issues tokens.

The challenges, the answers sign-in expects and the setup calls belong to the sign-in service; your Korint contact gives you its integration details.

Anonymous sessions​

Some tenants offer public, self-service quoting funnels that a visitor can start without an account. Where a tenant enables this, Korint issues a temporary anonymous session that can quote and capture details; when the visitor later signs in or creates an account, their work is handed off to the new account. Anonymous access is opt-in per tenant—it exists only where the tenant defines an anonymous role.

An anonymous session is itself an access token: POST /anonymous-session returns a sessionId and an accessToken you use as the bearer for that visitor's quoting calls, and POST /anonymous-session/handoff transfers the work once they sign in. The calls are covered in Anonymous quoting.


The three kinds of token​

There is more than one kind of token, and they are not interchangeable. Choosing the wrong one produces errors that look like permission bugs. Obtaining them is covered in Authentication; what each one is follows here.

Client-credentials tokenan integration

Issued by the OAuth 2.0 client-credentials grant. Carries a scope claim and identifies a client, not a person. Use it to read configuration and to start anonymous sessions.

User tokena person signed in

Issued when a human signs in. Identifies a user, so record-level permissions resolve against them. Where the tenant uses multi-factor authentication, password sign-in can stop at a code challenge, and the tokens arrive only once the user has answered it — see Multi-factor authentication.

Signing in returns both an id token and an access token, and the API accepts only the access token, not the id token. The id token is the intuitive choice, since it is the one carrying the email and profile, and it is rejected with 401 INVALID_CREDENTIALS, which reads as though the credentials were wrong rather than the token being the wrong kind.

How the scope check treats a user token depends on how the user signed in: through password sign-in, or through the hosted sign-in page that single sign-on goes through. See Scopes.

Anonymous session tokena visitor in a public funnel

Returned by POST /anonymous-session as accessToken. Korint issues it, not sign-in: its claims are { tenantId, sub: <sessionId>, type: "SESSION", iat, exp }, and it lasts 24 hours. What an anonymous session may do is listed in Anonymous quoting.

Record-level permissions resolve against a user, and a client-credentials token identifies a client that holds no role. An operation that checks a role on a record can therefore refuse it with 403, even though the token, tenant header and scope are all valid. Widening scopes will not help: act as a signed-in user who holds the role, or ask your Korint contact about your client's access.


How a request is checked​

A valid token is necessary but not sufficient. Every request passes up to three checks, in this order:

  1. Authentication — the token is well-formed, unexpired, and issued by the authorization server of the tenant the tenant header names.
  2. Permission — the fine-grained, role-based check described in Permissions, evaluated against the specific record being acted on: the policy, customer or firm you named.
  3. Scope — only on endpoints that declare one, and only after the permission check has passed. This is the check the scope table feeds: a client-credentials token must carry the scope covering that area. How a user token is checked depends on how the user signed in, as Scopes describes. What an anonymous session may do is listed in Anonymous quoting.

A 403 therefore means one of two things: your identity may not act on that record, or your token lacks a scope the endpoint requires.

Note what step 1 does not do: a request carrying no token at all is not rejected there. It is marked unauthenticated and allowed through, so the permission check is what refuses it — with 403 FORBIDDEN on most of the API rather than a 401. Only a malformed, expired or wrong-tenant token fails step 1, with 401 INVALID_CREDENTIALS.


Tenant isolation​

Every request carries its tenant, and the caller's session is verified against that tenant's own user directory. Permissions and data access are then scoped to that tenant, so one tenant's users can never see or act on another tenant's data. A request that arrives without a tenant is rejected.