Skip to content
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

Error Handling Upgrades #1200

Merged

Conversation

jleandroperez
Copy link
Contributor

@jleandroperez jleandroperez commented Jul 25, 2024

Fix

In this PR we're bringing AuthenticationError from iOS, and simplifying, a bit, our Authentication Error Handlers.

Test

  • Verify that attempting to log in with the wrong Code triggers a relevant error
  • Verify that attempting to log in with the wrong Password also triggers a relevant error
  • Verify that quickly requesting x4 codes gets you rate limited, and the error is relevant
  • Verify that attempting to use an expired code, gets you a relevant error too (they expire in 5 min?)

Important: We'll improve on the requestNotFound error (code expired) flow in a follow up. I'll touch base with Sly, and align both iOS and macOS.

Release

These changes do not require release notes.

@jleandroperez jleandroperez added debt Technical debt. [feature] login Anything relating to login labels Jul 25, 2024
@jleandroperez jleandroperez self-assigned this Jul 25, 2024
@jleandroperez jleandroperez added this to the 2.21 milestone Jul 25, 2024
- (void)showAuthenticationErrorForCode:(NSInteger)responseCode responseString:(NSString *)responseString {
switch (responseCode) {
case 409:
[self showAuthenticationError:NSLocalizedString(@"That email is already being used", @"Error when address is in use")];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For security reasons, statusCode 409 has been phased out, few years ago

@jleandroperez jleandroperez marked this pull request as ready for review July 25, 2024 21:52
@jleandroperez jleandroperez requested a review from roundhill July 25, 2024 21:52
Copy link
Contributor

@charliescheer charliescheer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Base automatically changed from lantean/wiring-simplenote-endpoints-spm to feature/1187-magic-links July 26, 2024 17:02
@jleandroperez
Copy link
Contributor Author

Thank youuuu

@jleandroperez jleandroperez merged commit e23dea3 into feature/1187-magic-links Jul 26, 2024
16 of 18 checks passed
@jleandroperez jleandroperez deleted the lantean/1187-error-handling-upgrades branch July 26, 2024 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Technical debt. [feature] login Anything relating to login
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants