Files
GibSend/packages/ui/src
KM Koushik e3e9635a5f feat: add customizable contact double opt-in flow (#350)
* feat: add customizable contact double opt-in flow

* test: add double opt-in service coverage

* fix: address review comments for double opt-in PR

- Make pending status conditional on doubleOptInEnabled flag
- Backfill legacy unsubscribeReason for reliable pending detection
- Add doubleOptInContent to contact book listing select
- Fix duplicate toast on DOI editor subject save failure
- Harden searchParams parsing against string[] values
- Make default DOI template use link mark for clickable URL
- Make public API create+update atomic via transaction
- Prevent contact upsert failure when DOI email send fails
- Fix empty string template variable replacement

Co-authored-by: opencode <opencode@anthropic.com>

* fix: harden double opt-in confirmation safeguards

Preserve explicit unsubscribe intent in DOI flows and prevent confirmation links from re-subscribing opted-out contacts. Also sanitize subscribe-page error messaging and use timing-safe hash comparison for link verification.

* ui stuff

* fix: require doubleOptInUrl in double opt-in templates

* feat: add configurable from address for double opt-in emails

* feat: add resend confirmation flow for pending contacts

* fix: move subscribe confirmation to explicit POST flow

* test: add contact book public API endpoint coverage

* docs: add double opt-in documentation and update OpenAPI spec

Add a user guide for the double opt-in feature covering setup, contact
statuses, email customization, template variables, and best practices.
Update the OpenAPI spec to include doubleOptIn fields in all contactBook
request/response schemas.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: opencode <opencode@anthropic.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 00:34:20 +11:00
..
2025-05-06 22:00:50 +10:00
2024-09-28 20:48:26 +10:00
2025-05-07 23:05:46 +10:00
2025-05-06 22:00:50 +10:00
2024-04-12 15:27:16 +10:00
2025-12-14 20:29:53 +11:00
2025-03-23 07:06:56 +11:00
2024-09-28 20:48:26 +10:00
2026-01-18 21:44:25 +11:00
2024-08-21 17:19:11 +10:00
2025-10-12 22:43:16 +11:00
2026-01-18 20:50:54 +11:00
2024-04-28 18:55:04 +10:00
2024-04-28 18:55:04 +10:00
2025-10-25 05:37:16 +11:00
2024-03-24 17:43:56 +11:00
2025-10-12 22:43:16 +11:00
2025-09-03 08:21:55 +10:00
2025-05-06 22:00:50 +10:00
2025-05-06 22:00:50 +10:00
2024-05-30 20:01:20 +10:00
2025-05-06 22:00:50 +10:00
2024-08-10 10:09:10 +10:00
2025-05-11 23:34:21 +10:00
2024-09-28 20:48:26 +10:00
2024-04-12 15:27:16 +10:00
2025-05-11 23:34:21 +10:00
2025-09-05 22:32:56 +10:00