# terms_acceptance_required

A sign-up needs the user's acceptance of the terms or privacy notice (400).

## Meaning

The organization's default branding, or the client's branding laid over it, links
`termsUrl` or `privacyUrl`, and a request that would create an account did not accept
them, or accepted other documents than the ones now in force. The answer comes from
`POST /v1/auth/register` without `terms_accepted: true` and the documents shown, from
`POST /v1/auth/sign-in` when a directory sign-in would create the account, from
`POST /v1/auth/terms-acceptance` with `accepted: false`, and from
`POST /v1/auth/device/decision` when the client's own branding links documents the user
has not accepted for it. No account is created and no device is approved.

## Impact

Normal protocol flow: the visitor is asked to accept and tries again. An existing account
is asked only once per client, by a client whose own branding links documents, and
changing a URL or a revision does not ask anyone again.

## Diagnosis

1. Look the `request_id` up on the admin dashboard's Troubleshooting page. The attempt is
   recorded as `auth.registration.completed` or `auth.sign_in.completed` with reason
   `terms_acceptance_required`.
2. Read the effective branding with `GET /v1/admin/orgs/{slug}/branding/preview`, adding
   `client` for the client concerned.
3. An acceptance is recorded as `auth.terms.accepted`, with the URLs and revisions shown.

## Mitigation

- As a user: accept the terms on the sign-up page and submit it again.
- As an integrator of the sign-up API: send `terms_accepted: true` only after the user
  has accepted.
- As an operator: remove `termsUrl` and `privacyUrl` from the branding if no acceptance is
  wanted.

## Escalation

Escalate when the sign-up page offers no way to accept. Open an issue with the request id
and the server version; never attach a password or a token.

---

[Problem code runbooks](https://www.nauthera.io/docs/v1/runbooks/problems) · Generated from [`internal/runbook/problems.yaml`](https://github.com/nauthera/nauthera-server/blob/main/internal/runbook/problems.yaml) in nauthera-server.
