feat(auth): soft email verification UX across the site #10

Merged
eliott merged 2 commits from develop into main 2026-05-20 09:03:28 +02:00
Owner

Mirrors the API's switch to soft email verification. Session now carries
emailVerified (parsed from the new email_verified JWT claim, defaulting to
true so pre-change tokens still validate). A sticky banner on every layout
lets unverified users either resend the link (resendVerificationForMeAction,
no email re-entry) or call refreshSessionAction to mint a fresh JWT after
verifying elsewhere — both trigger router.refresh() so the banner clears
without a logout/login.

Unverified accounts are kept out of write-only flows: /mes-ressources gets
a requireVerifiedSession guard, "Mes ressources" is hidden from the header,
comment forms degrade to a Notice, the resource page skips the user-state
lookup that would 403, and the home CTA stops nudging them toward creation.

verify-email page now embeds ResendVerificationForm on expired/invalid/error
outcomes, and RefreshSessionOnMount fires on success so the user doesn't
have to re-login to lose the banner. Drops unused @tiptap/extension-image.

Mirrors the API's switch to soft email verification. Session now carries emailVerified (parsed from the new email_verified JWT claim, defaulting to true so pre-change tokens still validate). A sticky banner on every layout lets unverified users either resend the link (resendVerificationForMeAction, no email re-entry) or call refreshSessionAction to mint a fresh JWT after verifying elsewhere — both trigger router.refresh() so the banner clears without a logout/login. Unverified accounts are kept out of write-only flows: /mes-ressources gets a requireVerifiedSession guard, "Mes ressources" is hidden from the header, comment forms degrade to a Notice, the resource page skips the user-state lookup that would 403, and the home CTA stops nudging them toward creation. verify-email page now embeds ResendVerificationForm on expired/invalid/error outcomes, and RefreshSessionOnMount fires on success so the user doesn't have to re-login to lose the banner. Drops unused @tiptap/extension-image.
Mirrors the API's switch to soft email verification. Session now carries
emailVerified (parsed from the new email_verified JWT claim, defaulting to
true so pre-change tokens still validate). A sticky banner on every layout
lets unverified users either resend the link (resendVerificationForMeAction,
no email re-entry) or call refreshSessionAction to mint a fresh JWT after
verifying elsewhere — both trigger router.refresh() so the banner clears
without a logout/login.

Unverified accounts are kept out of write-only flows: /mes-ressources gets
a requireVerifiedSession guard, "Mes ressources" is hidden from the header,
comment forms degrade to a Notice, the resource page skips the user-state
lookup that would 403, and the home CTA stops nudging them toward creation.

verify-email page now embeds ResendVerificationForm on expired/invalid/error
outcomes, and RefreshSessionOnMount fires on success so the user doesn't
have to re-login to lose the banner. Drops unused @tiptap/extension-image.
eliott merged commit 5f22289707 into main 2026-05-20 09:03:28 +02:00
Commenting is not possible because the repository is archived.
No reviewers
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cda-solutions/resources-relationnelles-website!10
No description provided.