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

[SDK-1911] Always use UsernamePane when using custom resolver #1918

Merged
merged 4 commits into from
Sep 11, 2020

Conversation

stevehobbsdev
Copy link
Contributor

@stevehobbsdev stevehobbsdev commented Sep 7, 2020

Changes

This PR causes Lock to show the username pane instead of the email pane when connectionResolver is specified. This is so that the validation for that field works as intended when the type of connection can be changed dynamically between those that require a username, and those that don't.

References

Fixes #1732

Testing

Unit tests added to verify functionality of using connectionResolver to force username input.

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of the platform/language

Checklist

@stevehobbsdev stevehobbsdev added this to the vNext milestone Sep 7, 2020
@stevehobbsdev stevehobbsdev requested a review from a team September 7, 2020 15:16
@lbalmaceda
Copy link
Contributor

@stevehobbsdev Would there be any valid scenario where the pane should be "email" instead of "username" when a resolver is specified?

@stevehobbsdev
Copy link
Contributor Author

@lbalmaceda There probably is a valid scenario. The problem is that these custom resolvers only run on form submit. So it's difficult to determine at the time when the login form is shown what the best field type is, when it could be changed later. The strategy here is to show a more generic input without formatting validation which works for both cases (email and username), when we know that a custom resolver is being used, as we can't know up-front which type is the best one to use.

@stevehobbsdev stevehobbsdev merged commit a00ed70 into master Sep 11, 2020
@stevehobbsdev stevehobbsdev modified the milestones: v11.26.4, v11.27.0 Sep 18, 2020
@stevehobbsdev stevehobbsdev mentioned this pull request Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ConnectionResolver wipes out email address/username and gives validation error first time....
2 participants