-
Notifications
You must be signed in to change notification settings - Fork 285
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
Login Flow: Splitting Username / Password Interfaces #1614
Conversation
Generated by 🚫 Danger |
You can test the changes in simplenote-ios from this Pull Request by:
|
let backButton = app.navigationBars[UID.NavBar.logIn].buttons.element(boundBy: 0) | ||
if backButton.isHittable { | ||
backButton.tap() | ||
} |
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.
We account for the fact that the Auth Flow may be multi-layered
EmailLogin.logIn(email: "", password: "") | ||
app.assertLabelExists(withText: Text.loginEmailInvalid) | ||
app.assertLabelExists(withText: Text.loginPasswordShort) | ||
} |
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.
This test is no longer relevant: Email + Password never show up simultaneously
if mode.isUsernameHidden { | ||
return .success | ||
} |
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.
This feels a little odd to me. It may be nit picky, but if you are performing a username validation and the username is hidden, should we be returning success?
func performPasswordValidation() -> AuthenticationValidator.Result { | ||
guard !mode.isPasswordHidden else { | ||
if mode.isPasswordHidden { | ||
return .success |
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.
Same comment as above, maybe the validator result should be able to return a not needed?
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.
Looks good, works as intended. Some naming comments below
@charliescheer I'll switch the Changing things here will break something down the line, and it'll be waaaay easier to patch in a standalone. Thank youuu!! |
Details:
Our new Authentication UX involves a multi staged flow, where Username and Password aren't necessarily entered in the same UI.
In this PR we're updating
SPAuthViewController
as follows:AuthenticationMode
has been enhanced, to support new fieldsAuthenticationMode
can no longer be modified, which helps us drop several methodsAuthenticationState
, which allows us to pass on the State across different screensPlus the Onboarding UI no longer displays a sheet when you tap
Log In
.Ref. #1611
Test
Log In
Log in with email
button turns blueForgot your Password
opens the PW recovery websiteLog in
, you get authenticatedTest: WPCOM SSO
Log In
Log in with WordPress.com
Release
RELEASE-NOTES.txt
was updated in 05869f2 with