SSO: OpenID Connect and SAML

Trowyn can be the identity provider for your apps and for Okta, Microsoft Entra ID and Google Workspace. Your users sign in by approving a push on their phone: they type their username, Trowyn shows a number, they tap the same number in Trowyn and confirm with Face ID. No passwords are involved, and there's no long-lived Trowyn session: every sign-in is a fresh approval.

SSO is part of the Business plan. Like everything else, it's free during early access. See pricing.

Okta

Trowyn as an OpenID Connect or SAML identity provider, or as an MFA factor.

Microsoft Entra ID

Federate a custom domain to Trowyn with SAML 2.0.

Google Workspace

A third-party SAML SSO profile for your users.

Any OIDC or SAML app

Your own app, or any product with "Sign in with SSO".

Before you start

  1. Link your users' phones the usual way (quickstart). For SSO, link each user with the username they'll type at sign-in as the external_user_id, normally their work email (for example alice@acme.example). Matching is exact, with a second try in lower case.
  2. In the console, open SSO and add an app. Test apps work right away and only reach phones linked in test mode; live apps need an approved organization.

Your identity provider URLs

Each organization has one issuer per environment. The console's SSO page shows yours with copy buttons.

URL
Issuer / SAML Entity ID https://trowyn.com/sso/<org id>/<live or test>
OIDC discovery <issuer>/.well-known/openid-configuration
Authorization endpoint <issuer>/authorize
Token endpoint <issuer>/token
Userinfo endpoint <issuer>/userinfo
JWKS <issuer>/jwks
SAML SSO URL (HTTP-Redirect and HTTP-POST) <issuer>/saml
SAML metadata <issuer>/saml/metadata
SAML signing certificate (PEM) <issuer>/saml/certificate.pem
IdP-initiated sign-in <issuer>/saml/idp/<app id> (optional ?RelayState=…)

OpenID Connect

GET https://trowyn.com/sso/<org>/<env>/authorize?response_type=code
    &client_id=trw_oidc_test_…&redirect_uri=https%3A%2F%2Fapp.example%2Fcallback
    &scope=openid%20email%20profile&state=…&nonce=…
    &code_challenge=…&code_challenge_method=S256&login_hint=alice%40acme.example

SAML 2.0

Attribute mapping

Each app has an optional mapping. Values are text with placeholders:

Placeholder Value
{user} The user's external_user_id, for example alice@acme.example
{user_local} The part before @ (alice)
{label} The link label you set when linking the phone
{org} Your organization name

Without a mapping, OIDC sends preferred_username = {user}, email = {user} (if it contains @) and name = {label}; SAML sends NameID = {user} and the attributes email and name the same way. Standard OIDC claims follow the scopes (email, email_verified need email; name, preferred_username and the like need profile); custom claims are always sent. email_verified is only sent if you map it to true, so only do that if you verify emails before linking.

{
  "nameid": "{user}",
  "authn_context": "urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified",
  "attributes": { "email": "{user}", "displayName": "{label}", "department": "Engineering" }
}

nameid and authn_context apply to SAML only. Claims Trowyn sets itself (iss, sub, aud, exp, nonce, amr and so on) can't be mapped.

What the user sees

  1. The app sends them to Trowyn's sign-in page (trowyn.com/signin), which names the app and your organization (with [TEST] for test apps).
  2. They enter their username (pre-filled from login_hint or the SAML Subject).
  3. Their phone gets the push. The page shows the number to tap (if number matching is on).
  4. They approve in Trowyn with Face ID. The page sends them back to the app.

If they deny it or it times out, they can try again (up to 5 tries per sign-in) or cancel, which returns access_denied (OIDC) or a signed AuthnFailed response (SAML) to the app. For a username with no linked phone, the page behaves exactly like a real request and simply times out, so it can't be used to discover who has Trowyn.

Security