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

In SSO mode, hide the password input instead of removing it from the DOM #1407

Merged
merged 3 commits into from
Jun 21, 2018

Conversation

luisrudge
Copy link
Contributor

@luisrudge luisrudge commented Jun 12, 2018

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:
lastpass

After:
lastpassok

Copy link
Contributor

@joshcanhelp joshcanhelp left a 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
Copy link
Contributor

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

Copy link
Contributor Author

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');
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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 😬

@luisrudge luisrudge merged commit 29eaf28 into master Jun 21, 2018
@luisrudge luisrudge deleted the fix-sso-removing-password-field branch June 21, 2018 00:49
@luisrudge luisrudge added this to the v11.8.0 milestone Jul 24, 2018
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.

Lock's SSO transformation triggers LastPass Chrome extension to autofill repeatedly
2 participants