Skip to content

feat(email-verification): expose isEmailVerified to client + settings UI#14502

Open
dylanjeffers wants to merge 1 commit into
mainfrom
feat/email-verification-status
Open

feat(email-verification): expose isEmailVerified to client + settings UI#14502
dylanjeffers wants to merge 1 commit into
mainfrom
feat/email-verification-status

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Summary

Completes the remaining email-verification work: exposes the identity-service isEmailVerified flag to clients and surfaces verification status in account settings on all three clients (web desktop, mobile-web, React Native).

The backend already stored isEmailVerified, had /email/verify + /email/resend-verification endpoints, the /verify-email landing page, and resend UI in settings. This PR wires the verification status through to the UI.

Changes

Expose isEmailVerified

  • identity-service: include isEmailVerified in the GET /user/email response.
  • common: add IdentityService.getUserEmailAndStatus() returning { email, isEmailVerified } (existing getUserEmail() now delegates to it — no caller changes), and a new useCurrentUserEmail tan-query hook.

Settings status indicator (all 3 clients)

  • Show a "Email verified" (check) / "Email not verified" (error) indicator in the Email Verification card.
  • Hide the "Resend Verification Email" button once the email is verified.

Desktop resend button

  • Add disabled while the request is in-flight, matching mobile-web and RN (it already had isLoading).

Note on data flow

The audit suggested adding isEmailVerified to UserMetadata and mapping it through the SDK account adapter. Email and verification status live in identity-service (/user/email), not in the SDK/discovery user model, so a field on UserMetadata would never be populated. Instead the status flows through the dedicated useCurrentUserEmail hook, which the settings pages read directly.

Testing

  • tsc passes for @audius/common, @audius/web, @audius/mobile.
  • eslint clean for all changed files.

🤖 Generated with Claude Code

Expose the identity-service `isEmailVerified` flag to clients and surface
email verification status in account settings on all three clients.

- identity-service: include `isEmailVerified` in the `/user/email` response
- common: add `getUserEmailAndStatus()` to the identity service and a
  `useCurrentUserEmail` tan-query hook returning `{ email, isEmailVerified }`
- settings (web desktop, mobile-web, React Native): show a verified /
  not-verified status indicator; hide the resend button once verified
- desktop: disable the resend button while the request is in-flight to
  match mobile-web and RN

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 38c0d7a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14502.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant