-
Notifications
You must be signed in to change notification settings - Fork 92
[PM-9842] Verify email token services #849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
No New Or Fixed Issues Found |
| /// `verifyEmailToken()` performs a request to verify if the verification token received by email is still valid. | ||
| func verifyEmailToken() async throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎨 Add test when verifying email is not successful.
| if errorResponse.message.contains("Expired link") { | ||
| throw VerifyEmailTokenRequestError.tokenExpired | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Does the server send a specific error number or something else we could use instead of the message string? I think this kind of error message comparison is brittle and may be a bit harder to know what's happening if there's an issue because the message changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright I'll raise it up, thanks for the info! 😄 I'll approve it as is now.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #849 +/- ##
=======================================
Coverage 88.51% 88.52%
=======================================
Files 606 607 +1
Lines 30267 30288 +21
=======================================
+ Hits 26792 26811 +19
- Misses 3475 3477 +2 ☔ View full report in Codecov by Sentry. |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-9842
📔 Objective
Add services to verify if token received by email is still valid. Can return error if the token is expired or user is already registered.
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes