Skip to main content
“Login with Aiveth” lets your app sign people in through Aiveth instead of keeping its own passwords. Aiveth is an OpenID Connect provider. Your app sends the person to Aiveth, Aiveth signs them in with your organization’s rules (two-step, passkeys, single sign-on and so on), and your app gets tokens that say who they are. For a step-by-step first integration, see the Quickstart.

Register an app

1

Open Apps

In the console, open Apps and select Register app. You need the apps:manage power.
2

Choose the kind

  • Server app: a web app with its own server. It keeps a secret.
  • Browser or mobile app: a single-page or phone app. It can’t keep a secret, so it proves itself with PKCE alone.
  • Machine: a service that signs in as itself, with no person. See Machine-to-machine.
3

Add return addresses

Under Return addresses, add one address per line. Aiveth sends people back only to these exact addresses.
4

Copy the credentials

Copy the Client ID, and the Client secret for a server app. The secret is shown once.
Select an app in the list to open its panel. There you can see its status, change its sign-out settings, set how long it keeps people signed in, and turn features such as device login and DPoP on or off.

Return address rules

  • The address must be absolute and must not contain a #fragment.
  • It must use https. http is allowed only for localhost, 127.0.0.1 or [::1].
  • In Production, localhost addresses are refused. Use your Development environment while you build.
  • The address in the authorization request must match a registered one exactly.
  • For a native app that listens on a loopback address: if you register the loopback address without a port, Aiveth accepts the same address on any port (RFC 8252).

How the flow works

  1. Your app redirects the browser to /oauth/authorize with response_type=code, a scope that includes openid, and a PKCE code_challenge with code_challenge_method=S256.
  2. If the person is not signed in to Aiveth, Aiveth shows your organization’s sign-in page. If they are, Aiveth continues straight away.
  3. Before it issues a code, Aiveth may show the person a screen: your organization’s terms, a consent notice, or a “Confirm it’s you” step when your app asked for one.
  4. Aiveth redirects to your return address with code, state and iss.
  5. Your server posts the code and the code_verifier to /oauth/token and gets an ID token and an access token.
PKCE with S256 is required for every app, public or confidential. A request without it gets invalid_request.

Rules Aiveth enforces

  • One organization per app. An app signs in only people of the organization that registered it. Anyone else gets access_denied.
  • Codes are single use. A code lasts two minutes and works once, for the app and return address it was issued to. A second attempt fails, right or wrong.
  • The person must still be able to sign in. A suspended person, or a person whose organization is suspended, gets no tokens.
  • A turned-off app signs nobody in. In the app’s panel, Turn off stops all sign-ins until the app is registered again.
  • Your organization’s sign-in check runs first. If you set up a sign-in check under Developers, Aiveth asks your server before every sign-in and every token refresh.

Scopes

See Tokens and claims for every claim.

Ask the person to confirm it’s them

For a sensitive step, send the person to /oauth/authorize again with one of these:
  • acr_values=urn:aiveth:acr:2fa: the person must have proved a second factor (a two-step code or a passkey) in this session. A remembered device or a password-only sign-in doesn’t count.
  • max_age=N: the person must have proved it’s them in the last N seconds.
  • prompt=login: the person must prove it’s them now.
  • prompt=none: never show a screen. Aiveth answers login_required or interaction_required instead.
The ID token’s acr is urn:aiveth:acr:2fa when the session proved a second factor, and urn:aiveth:acr:1fa otherwise. auth_time is the time of the latest proof. If the person has no second factor, an acr_values request ends with unmet_authentication_requirements.

Errors in the redirect

When Aiveth can trust the return address, it reports errors there as error and error_description, with your state: If the app is unknown or the return address is not registered, Aiveth never redirects. It shows an error page instead.