---
id: TST-PFM-SEC-037
title: Invitations unit checks
kind: unit
product_area: platform
module: security
revision: 2
status: draft
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: react-console
files:
  - lib/auth/__tests__/invitations.test.ts
implements:
  - ATS-PFM-SEC-005-03
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 1
isolation: The suite owns its input fixtures and installed doubles.
assertion_evidence:
  - provenance: test
    source: 'react-console:lib/auth/__tests__/invitations.test.ts#invitation token parsing'
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#accepts a base64url token and trims the
      surrounding whitespace an email client adds
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#rejects anything that is not a plausible
      token
  - provenance: test
    source: 'react-console:lib/auth/__tests__/invitations.test.ts#invitation summary parsing'
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#reads the documented payload, including
      the organization the person is invited to
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#tolerates a missing name, organization
      and expiry, and defaults the access type
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#answers null when the payload names
      nobody
  - provenance: test
    source: 'react-console:lib/auth/__tests__/invitations.test.ts#refusal codes'
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#gives each of the design's problem codes
      its own refusal, so each gets its own screen
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#reads the code wherever the problem
      document puts it, and whatever the status is
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#separates rate limiting, a server that is
      down and a rejected password
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#falls back to the neutral refusal rather
      than guessing at a code it does not know
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#has wording for every refusal, so a new
      code cannot reach a screen with no message
  - provenance: test
    source: 'react-console:lib/auth/__tests__/invitations.test.ts#masked address comparison'
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#recognises the signed-in person as the
      invited one
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#rules out somebody else, which is what
      the other-account screen turns on
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#answers no rather than yes when there is
      nothing to compare
  - provenance: test
    source: 'react-console:lib/auth/__tests__/invitations.test.ts#invitation requests'
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#reads the summary from the public route
      without an Authorization header
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#accepts with the token in the body and
      answers the address to sign in with
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#reads a retried acceptance as the success
      it is, not a refusal
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#carries each refusal out of the request,
      and names an unreachable or unconfigured API
  - provenance: test
    source: >-
      react-console:lib/auth/__tests__/invitations.test.ts#treats a successful but empty answer as
      unusable rather than signing nobody in
dependency_evidence: >-
  The test imports the authentication helper and supplies its inputs in-process. Browser storage,
  environment values or fetch responses are fixtures where the file replaces them; these checks do
  not call a live identity provider.
evidence:
  - 'react-console:lib/auth/__tests__/invitations.test.ts'
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
binding_note: >-
  Each binding names the scenario to which this file contributes assertions. A binding is not a
  recorded pass and does not extend the file’s dependency boundary.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
---
# Invitations unit checks

## Verification Boundary

The file evaluates production helpers with controlled inputs in-process. The assertion references identify the source checks for invitations.

## What This Suite Proves

The source assertions support the observations named in the bound scenarios. A scenario spanning multiple files must retain the other files’ contributions.

## What It Does Not Prove

This examination does not run the suite. Passing behavior, deployed conformance and the behavior of substituted dependencies require separate execution evidence.

## Real Dependencies and Test Doubles

The test imports the authentication helper and supplies its inputs in-process. Browser storage, environment values or fetch responses are fixtures where the file replaces them; these checks do not call a live identity provider.

## Must Not Be Doubled

Keep the production helper, schema, matcher or declaration under examination real. Substituting the decision itself would remove the behavior the assertions exercise.
