OpenBook
  • Problems
  • Tracks
  • How it works
  • Pricing
Start practicingSign In
Problems/Auth & Permissions

25. Single-Use Invitation Links

Easy

Team admins invite people by email with a random token that expires and can be accepted exactly once.

30 minute budget0.0% acceptancetokens · expiry · invitations

Requirements

  1. 01Every request names the signed-in user by email in an `x-user` header; emails compare case-insensitively.
  2. 02The creator of a team is its admin; only admins invite, list pending invitations and revoke them.
  3. 03An invitation has an unguessable random token, an email, a role (admin or member) and an expiry; time comes from the `x-now` header when present.
  4. 04Accepting an invitation adds the signed-in user to the team with the invited role, and works only once.

What the hidden tests check

  • Everything the interviewer tells you is checked.
  • Every way a token can stop working is tried, and the pending list must agree with what accept does.

4 more details are held back. In a mock interview they come out only when you ask the interviewer the right question; in practice they are listed in the workspace.

Sign in to start

Attempts, files and transcripts are saved to your account so the grader can review how you worked.

Sign inCreate an account
OpenBook

Practice for interviews where you build a feature with an AI assistant.

Early preview. Problems, grading and the interviewer are still changing.

Practice

  • Problems
  • Tracks
  • How it works
  • Pricing

Legal

  • Terms
  • Privacy
© 2026 OpenBook.