-
Notifications
You must be signed in to change notification settings - Fork 555
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
In SSO mode, hide the password input instead of removing it from the DOM #1407
Conversation
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.
A few minor comments but LGTM.
@@ -70,7 +66,12 @@ export default class LoginPane extends React.Component { | |||
<div> | |||
{header} | |||
{fieldPane} | |||
{passwordPane} | |||
<PasswordPane |
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.
Why are you switching from using a const
? Not a blocker, just curious
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 const was a conditional. It was adding/removing the input from the DOM based on that condition. This triggered the bug itself. So, now, it will always have the input, it will only use css to hide the input
@@ -179,6 +179,9 @@ export const hasOneSocialBigButton = hasOneViewFn( | |||
'.auth0-lock-social-button.auth0-lock-social-big-button' | |||
); | |||
export const hasPasswordInput = hasInputFn('password'); |
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.
How is this used? Should it account for the input being hidden?
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.
Maybe that's handled by the hasHiddenPasswordInput
you added but still worth a consideration.
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.
not sure what you mean 😬
Fix #1397
The issue happened because Lock was REMOVING the password input from the DOM. The fix was to let the input in the DOM, but add a css class that hides the input.
Before:
After: