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

Fixed Signup Bugs #455

Merged
merged 5 commits into from
Sep 7, 2017
Merged

Fixed Signup Bugs #455

merged 5 commits into from
Sep 7, 2017

Conversation

cocojoe
Copy link
Member

@cocojoe cocojoe commented Aug 16, 2017

Tidy up of #448

  • Perform validation for custom fields on sign-up
  • Fix "next" button on custom fields
  • Remove forced "done" button on password field
  • Clear existing user info when switching to Signup

davidyee and others added 3 commits August 15, 2017 12:09
Changes:

- Perform validation for custom fields on sign-up

- Fix "next" button on custom fields

- Remove forced "done" button on password field

- Clear password value and custom field values after successful sign-up
  to prevent re-use of personal information for subsequent sign-ups by
  other users

- Show the correct selected segmented UI when showing the login form
  after signing-up
Changes:

- Provide a location for the UIAlertController popup when clicking on
  the terms of service and privacy policy section of the sign-up form
Added reset to User Protocol
@cocojoe cocojoe added this to the v2-Next milestone Aug 16, 2017
@cocojoe cocojoe requested a review from lbalmaceda August 16, 2017 09:12
@@ -112,6 +112,10 @@ struct DatabaseInteractor: DatabaseAuthenticatable, DatabaseUserCreator, Loggabl

guard !connection.requiresUsername || self.validUsername else { return callback(.nonValidInput, nil) }

for (fieldName, _) in customFields {
guard self.user.validAdditionaAttribute(fieldName) else { return callback(.nonValidInput, nil) }
Copy link
Contributor

Choose a reason for hiding this comment

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

typo additiona instead of additional

Copy link
Member Author

Choose a reason for hiding this comment

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

When you copy/paste another PR 😆

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually this is a feature https://github.com/auth0/Lock.swift/blob/master/Lock/User.swift#L36 so it's consistently incorrect 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

You're saying you can't change it now?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure it's not Public API, I can change it, was joking

Lock/User.swift Outdated
@@ -35,6 +35,8 @@ protocol DatabaseUser {

func validAdditionaAttribute(_ name: String) -> Bool
Copy link
Contributor

Choose a reason for hiding this comment

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

Same typo in these 2 lines

form.emailField.nextField = showUsername ? form.usernameField : form.passwordField
form.usernameField?.text = username
form.usernameField?.returnKey = .next
form.usernameField?.nextField = form.passwordField
form.passwordField.returnKey = .done
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this behavior gone? Pressing "return" should move to the next field, and if I'm on the last field it should submit the form.

Copy link
Member Author

Choose a reason for hiding this comment

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

@cocojoe cocojoe merged commit a2d89fb into master Sep 7, 2017
@cocojoe cocojoe deleted the pr-448 branch September 7, 2017 15:36
@cocojoe cocojoe modified the milestones: v2-Next, 2.3.2 Sep 15, 2017
@cocojoe cocojoe mentioned this pull request Sep 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants