swepayError Catalog

Native Guard

TOTP Not Enrolled 403

The user behind the access token has no active TOTP enrollment to step up with.

type https://errors.swepay.com.br/native-guard/step-up-totp-not-enrolled

What this means

Returned by POST /identity/v1/realms/{realm}/stepup/totp when the access token and its session are valid, but the user has no active TOTP enrollment — there is no second factor to verify the code against. An enrollment that was started but never confirmed does not count.

The same response is returned when the user account behind the token is disabled or no longer exists. The TOTP code was not checked and no attempt was counted.

Common causes

  • The user never enrolled an authenticator app.
  • The enrollment was started but not confirmed with a first code.
  • Two-factor authentication was disabled for the user after it had been set up.
  • The user account was disabled or removed after the access token was issued.

How to resolve

Not retryable as sent — no code can succeed until the user has an active enrollment. Guide the user through TOTP setup with the same access token:

  1. POST /identity/v1/realms/{realm}/protocol/openid-connect/2fa/setup to generate the secret for the authenticator app.
  2. POST /identity/v1/realms/{realm}/protocol/openid-connect/2fa/verify-setup with the first code from the app to activate it.

Then repeat the step-up with a code from the app.

Example response

HTTP 403 · application/problem+json
{
  "type": "https://errors.swepay.com.br/native-guard/step-up-totp-not-enrolled",
  "title": "TOTP Not Enrolled",
  "status": 403,
  "detail": "The user has not enrolled a TOTP secret.",
  "traceId": "Root=1-00000000-000000000000000000000000;Parent=0000000000000000;Sampled=0"
}

References

Machine-readable: /native-guard/step-up-totp-not-enrolled.json