-
Notifications
You must be signed in to change notification settings - Fork 120
Block sign ups to WordPress.com accounts. #3286
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
…ail address does not match a wp.com account
…all available horzontal space
Garance91540
left a comment
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.
👏👏👏 The only thing I mentioned on slack is that the link "need help finding your email" should open the Help center
|
You can trigger an installable build for these changes by visiting CircleCI here. |
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
Thanks for the review @Garance91540 I just pushed an update to:
I guess this is ready for a close look at the code 😊 |
…ld trigger a new build on CI
jaclync
left a comment
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.
|
|
||
| /// Maps error codes emitted by WPAuthenticator to a domain error object | ||
| enum AuthenticationError: Int, Error { | ||
| case emailDoesNotMatchWPAcount = 7 |
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.
nit:
| case emailDoesNotMatchWPAcount = 7 | |
| case emailDoesNotMatchWPAccount = 7 |
|
|
||
| func isSupportedError(_ error: Error) -> Bool { | ||
| let wooAuthError = AuthenticationError.make(with: error) | ||
| return wooAuthError == .emailDoesNotMatchWPAcount || wooAuthError == .notWPSite |
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.
nit: how about just checking if the error is not unknown, since we handle all the known cases?
| return wooAuthError == .emailDoesNotMatchWPAcount || wooAuthError == .notWPSite | |
| return wooAuthError != .unknown |
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.
I went with the long form because it seemed more explicit to me, but will update, thanks!
| // MARK: - Data and configuration | ||
| let image: UIImage = .loginNoWordPressError | ||
|
|
||
| let text: NSAttributedString = NSMutableAttributedString(string: Localization.errorMessage) |
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.
nit: any reasons for using the mutable version?
| let text: NSAttributedString = NSMutableAttributedString(string: Localization.errorMessage) | |
| let text: NSAttributedString = .init(string: Localization.errorMessage) |
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.
Nope, good point, thanks!


Closes #3146
And a gif showing the interactions:

I am not sure if the actual link that can be opened in a web view from the alert is correct. Changing that takes 30 seconds.
Changes
Testing
bundle exec pod installUpdate release notes:
RELEASE-NOTES.txtif necessary.