Skip to content

feat(users): report a recovery session on /users/me #501

Open

Description

@Bccorb

A client in cookie transport cannot read the access token, so the only signal that it holds a recovery session (recovery: true, from /recovery/complete or /recovery-codes/redeem) is the response that issued it. After a page reload the React SDK (fells-code/seamless-auth-react#211) can no longer route the user to enrollment, or refresh after enrolling to drop the claim.

  • GET /users/me (already allowed for recovery sessions) returns session: { recovery: boolean } or a top-level recovery flag, read from the session row.
  • Add it to MeResponseSchema in @seamless-auth/types (optional, so older clients still parse).
  • The SDK reads it on hydration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv0.20Targets the v0.20 release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions