swepayError Catalog

Native Guard

Invalid Session 401

The session behind the access token sent to the TOTP step-up is no longer active.

type https://errors.swepay.com.br/native-guard/step-up-totp-invalid-session

What this means

Returned by POST /identity/v1/realms/{realm}/stepup/totp when the access token itself is valid but the session it belongs to cannot be elevated: the token carries no session identifier, or that session no longer exists, has expired or was terminated.

A step-up elevates an existing session in place, so there must be an active one to elevate. The TOTP code was not checked and no attempt was counted.

Common causes

  • The user signed out, or the session was terminated, after the access token was issued.
  • The session reached its expiry while the access token was still within its lifetime.
  • The access token is not bound to a user session.

How to resolve

Not retryable with tokens from that session. Sign the user in again to open a new session, then repeat the step-up with the new access token and a current TOTP code.

Example response

HTTP 401 · application/problem+json
{
  "type": "https://errors.swepay.com.br/native-guard/step-up-totp-invalid-session",
  "title": "Invalid Session",
  "status": 401,
  "detail": "The session backing this access token is no longer valid.",
  "traceId": "Root=1-00000000-000000000000000000000000;Parent=0000000000000000;Sampled=0"
}

References

Machine-readable: /native-guard/step-up-totp-invalid-session.json