# How Trustaige keeps a sign-in safe

> The trust model behind customer sign-in. Who holds what, what each sign-in proves, what your app receives, and where your own part begins.

Source: https://docs.trustaige.com/customer-credentials/trust-model

This page is for whoever reviews Trustaige before an app relies on it. It sets
out who holds what, what each sign-in proves, what your app receives, and where
Trustaige's part ends and yours begins.

## The person holds their identity

A **Trustaige Identity** belongs to the person. It holds their passkeys and
their ways to recover, and it points to no organization. The contacts they add
for recovery are theirs alone: no organization sees them.

Your organization knows the person through the account it gives them. Your
records about them, such as their name, email and orders, stay in your
database. Trustaige keeps that your organization gave them an account, with
its status and dates, and nothing your forms collect.

Each organization receives its own `sub` for the person. Two organizations
can't match their customers to each other through Trustaige, and your app
doesn't learn which other organizations the person uses.

## What each sign-in proves

A passkey is a key pair. The private key stays on the person's device, in its
secure hardware; Trustaige keeps only the public key. Three properties follow:

| Property | What it means |
|---|---|
| **Bound to Trustaige's domain** | The passkey works only on `id.trustaige.com`. A look-alike site gets nothing it can use. |
| **Unlocked by the person** | The device asks for their face, fingerprint or PIN before it signs. Trustaige requires this at every sign-in. |
| **Asked for every time** | Each sign-in to your app asks for the passkey again, even a minute after the last one. Trustaige has no silent sign-in. |

So a sign-in proves that the person who holds this Trustaige Identity was
present, on a device they unlocked, on Trustaige's real page.

It doesn't prove who the person is in the world. Trustaige recognises the same
person each time; it doesn't check their legal name or documents. Anything you
need to know about them, such as their age or address, you check yourself, the
way you do today.

## No weaker way in

Trustaige has one way to sign in. There's no password behind the button, no
code sent by SMS or email, and no push to approve, so there's nothing weaker
for an attacker to fall back to.

The method underneath is Trustaige's to choose. Today it's a passkey. When
Trustaige adopts something better, your button, your code and your customers'
`sub` stay as they are, which is why the button
[names Trustaige rather than the method](/customer-credentials/sign-up-button#name-trustaige-on-the-button).

## Recovery that doesn't become a back door

A way back in is also a way for someone else to get in, so recovery is built to
be slow and visible:

- **A recovery code** the person saved.
- **An email link to an address the person added**, which starts a 72-hour
  wait. Any of the person's remaining passkeys can cancel it during that time,
  and the person is told either way. Only after the wait can they add a new
  passkey.

Your app takes no part, and your support team has nothing to reset. After
recovery the person has the same Trustaige Identity, so your `sub` for them
doesn't change.

## What your app receives

| | |
|---|---|
| **An ID token signed by your organization** | Your organization has its own signing keys (ES256), published at your issuer. The token is for your app's client ID, carries the nonce from your request, and is short-lived. |
| **A `sub`** | Your identifier for this person, the same at every sign-in and across renewals. |
| **The credential that admitted them** | Its type, the claims you set, and when it ends. See [What the ID token carries](/customer-credentials/sign-in#what-the-id-token-carries). |
| **A refusal with a reason** | When the account is suspended, revoked or missing, your callback gets `error=access_denied` with a `reason`, and no token. |

Your app doesn't receive the person's name or email, their recovery contacts,
their other organizations, or credentials others gave them.

Every sign-in is checked against the account's status at that moment. A
suspension or revocation applies from the person's next sign-in, and Trustaige
issues no refresh tokens that could outlive it.

## Where your part begins

Trustaige's guarantees end when your callback starts a session. From there,
your app holds the trust:

| Trustaige | Your app |
|---|---|
| Proves the person at each sign-in | Verifies the callback: state, nonce, PKCE and the token's signature, as in [the callback](/customer-credentials/sign-in#the-callback) |
| Keeps passkeys and recovery | Keeps the client secret on your server, and registers redirect addresses exactly |
| Signs the ID token with your organization's key | Keeps its own session safe after sign-in |
| Checks the account's status at each sign-in | Asks for a [countersignature](/customer-credentials/countersign) before actions that move money or change how the account is reached |
| Offers one way in, with nothing weaker behind it | Decides what else it offers, and protects it, as in [Beside other sign-in methods](/customer-credentials/beside-other-methods) |

> **A session outlives the sign-in:** Malware or a stolen cookie can act inside a valid session without ever signing
> in. Countersign covers that gap: the person confirms the exact action on their
> own device, and your server receives a proof bound to that one action.

Next: [set up in the hub](/customer-credentials/setup).
