Reuse `EMAIL_EXPIRATION_TIME` and `EMAIL_ATTEMPTS_LIMIT`, like the email
2FA codes, instead of hardcoded values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sending the code only for allowed emails made those responses take as
long as the SMTP round trip, which tells allowed and unknown emails
apart. Mail the code in the background so both answer the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Support the Item Send type used by the Bitwarden clients (2026.10+) to
share a single vault item through a temporary link.
- New `Item` Send type; the item is encrypted client side into one
opaque blob, stored with its item id in clear
- Item Sends require email verification
- Only items the user owns, or organization items they can edit and see
the password of, can be shared; deleted, archived and SSH key items
can't. Access is checked on creation and when the item changes
- Accesses are counted like Text Sends, so one-time links work
- Opt-in through the `pm-34203-temporary-item-sharing` client feature
flag; while disabled, Item Sends can't be created and existing ones
are hidden from owners and recipients
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Allow Sends to be restricted to a list of email addresses. Recipients
request a one-time code by email through the `send_access` grant and
exchange it for an access token, matching the upstream flow.
- Store `auth_type` and `emails` on sends, with an additive migration
- One-time codes: single use, constant-time compared, invalidated after
5 wrong attempts, 60s resend cooldown, 5 minute validity
- Unlisted emails get the same response as listed ones and no email is
sent, so recipients can't be enumerated
- Access is gated on the stored auth type and fails closed when a Send
doesn't hold the emails or password its auth type requires
- Shared create/update handling of authType; it is inferred when
missing, like upstream, for clients that don't send it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>