Skip to content

feat(release-notes): enhance unsubscribe functionality and user exper… - #105

Merged
viv-helix merged 1 commit into
release-ulmofrom
feat/LP-815
Jun 23, 2026
Merged

feat(release-notes): enhance unsubscribe functionality and user exper…#105
viv-helix merged 1 commit into
release-ulmofrom
feat/LP-815

Conversation

@viv-helix

@viv-helix viv-helix commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

Enable token-based, login-free unsubscribe for Release Notes email notifications.

Previously, the unsubscribe page at /release-notes/unsubscribe required Studio login and called an authenticated GET endpoint. Users clicking the link from email were redirected to login, which blocked one-click unsubscribe.

This PR updates the flow so users can unsubscribe using a signed token from their email, without signing in.

Changes

  • ReleaseNoteUnsubscribe reads ?token= from the URL and shows:
    • Confirmation UI when a token is present
    • Invalid-link error when the token is missing
  • unsubscribeFromReleaseNoteEmails(token) sends an unauthenticated POST to /api/release_notes/v1/email/unsubscribe/ with { token } via getHttpClient() (replaces authenticated GET)
  • index.jsx adds a custom auth handler so /release-notes/unsubscribe skips the login redirect while the rest of the MFE still requires authentication
  • i18n adds invalid-link messages and updates error copy to reference the email link instead of signing in

User flow

  1. User receives a Release Notes digest email with a link like:
    {COURSE_AUTHORING_MICROFRONTEND_URL}/release-notes/unsubscribe?token=<signed-token>
  2. User opens the link — no login required
  3. User confirms unsubscribe
  4. Frontend POSTs the token to the backend; success or error is shown on the page

Backend dependency

Requires the corresponding edx-platform / release-notes backend change that:

  • Generates per-user signed tokens in digest emails
  • Exposes POST /api/release_notes/v1/email/unsubscribe/ with { "token": "..." }

Test plan

  • Open /release-notes/unsubscribe without a token query param → invalid link message is shown
  • Open /release-notes/unsubscribe?token=<valid-token-from-email> while logged out → page loads without login redirect
  • Click Unsubscribe with a valid token → success message; user is excluded from future digest emails
  • Click Unsubscribe with an invalid/expired token → error message with retry option
  • Confirm other Studio routes (e.g. /home, /release-notes) still require login

Jira

@viv-helix
viv-helix merged commit 45a6f67 into release-ulmo Jun 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants