feat(email-verification): expose isEmailVerified to client + settings UI#14502
Open
dylanjeffers wants to merge 1 commit into
Open
feat(email-verification): expose isEmailVerified to client + settings UI#14502dylanjeffers wants to merge 1 commit into
dylanjeffers wants to merge 1 commit into
Conversation
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>
|
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14502.audius.workers.dev Unique preview for this PR (deployed from this branch). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the remaining email-verification work: exposes the identity-service
isEmailVerifiedflag 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-verificationendpoints, the/verify-emaillanding page, and resend UI in settings. This PR wires the verification status through to the UI.Changes
Expose
isEmailVerifiedidentity-service: includeisEmailVerifiedin theGET /user/emailresponse.common: addIdentityService.getUserEmailAndStatus()returning{ email, isEmailVerified }(existinggetUserEmail()now delegates to it — no caller changes), and a newuseCurrentUserEmailtan-query hook.Settings status indicator (all 3 clients)
Desktop resend button
disabledwhile the request is in-flight, matching mobile-web and RN (it already hadisLoading).Note on data flow
The audit suggested adding
isEmailVerifiedtoUserMetadataand 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 onUserMetadatawould never be populated. Instead the status flows through the dedicateduseCurrentUserEmailhook, which the settings pages read directly.Testing
tscpasses for@audius/common,@audius/web,@audius/mobile.eslintclean for all changed files.🤖 Generated with Claude Code