Login button is not responsive for Enterprise connections
Describe the problem
When we type an enterprise connection user email address, Lock automatically switches to SSO login screen (expected), however login button does nothing. I think it only happens on iOS 14.
What was the expected behavior?
Previously it used to take user to provider login web page.
Environment
- Version of
Lock.swiftused: 2.19.1 - Version of iOS: 14
- Version of Xcode: 12
Hi @arash01, what does appear in the console when you click the login button if you enable Logging?
Hi @arash01, what does appear in the console when you click the login button if you enable Logging?
Apparently for some reason it's expecting password:
VERBOSE | DatabasePresenter.swift:267 - new value: arash@### for type: email
VERBOSE | DatabasePresenter.swift:285 - Enterprise connection detected: EnterpriseConnection(name: "###", domains: ["####"], style: Lock.AuthStyle(name: "####", image: Lock.LazyImage(bundle: NSBundle </Users/####/Library/Developer/CoreSimulator/Devices/#####/Lock.framework> (loaded), name: "ic_auth_microsoft"), foregroundColor: UIExtendedGrayColorSpace 1 1, normalColor: UIExtendedSRGBColorSpace 0 0.631373 0.945098 1, highlightedColor: UIExtendedSRGBColorSpace 0 0.430958 0.645098 1, borderColor: nil))
VERBOSE | DatabasePresenter.swift:267 - new value: for type: password```
I can confirm it's been broken since version 2.17.1.
@arash01 does it happen with the sample app that is in the repo?
Closing due to inactivity.
@Widcket can you reopen this ticket. We are also experiencing this issue, I am going to submit an enterprise support ticket as well, but this is a big deal to unblock and a pretty serious regression issue for you to disregard due to inactivity on the ticket.
To note, just like us most users/ enterprise customers are probably locking versions and waiting for a fix from you because as paid customers I shouldn't have to rely on an open source model to get critical SDK functionality working as expected.
@jalleyne Thanks for raising. However, taking a step back, this issue was closed as the ask was can this be reproduced in the sample app, which is also one of the asks in the issue template to ensure we can efficiently reproduce. As often we find if it can't be reproduced in the sample it's often an issue outside of the library.
This is only the second time I have heard of this. However, I'll re-open. Can you provide a bit more context please, any enterprise connection in particular and what version of iOS / Device.
If you run into something critical I would advise opening an enterprise support ticket for optimal routing.
Thanks
@cocojoe thanks for your response. I definitely understand from a reproducibility perspective, just keep in mind we don't always have time and resources to debug third party libraries.
@laeur can we work with @cocojoe to reproduce?
@jalleyne, @cocojoe hi!
I've made some debugging. And the problem occurs in file DatabasePresenter.swift line 115:
guard let isValid = view.form?.shouldSubmit(), isValid else { return }
The form is not correctly validates. Validation starts at file Credentials.swift line 57 and fails in DatabaseInterector.swift line 70 with an error:
Lock.InputValidationError.mustNotBeEmpty
Testing was made on latest sdk (v. 2.21.0)
And one more thing. If at first (before enterprise mode enabled) I enter the password and then enter a correct email that enables enterprise mode the button works correctly. Because though password field is hidden but it's not empty.
If you'll need some more info, let me know.
Thank you!
@laeur I'll look into it.
@laeur I managed to reproduce it, seems it was a regression introduced in this PR. Working on it.
@Widcket @cocojoe thank you for taking a deeper look into this.
The fix is now out in v2.22.0.