Lock.swift icon indicating copy to clipboard operation
Lock.swift copied to clipboard

Login button is not responsive for Enterprise connections

Open ashdns opened this issue 6 years ago • 13 comments

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.swift used: 2.19.1
  • Version of iOS: 14
  • Version of Xcode: 12

ashdns avatar Oct 06 '20 05:10 ashdns

Hi @arash01, what does appear in the console when you click the login button if you enable Logging?

Widcket avatar Oct 06 '20 05:10 Widcket

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```

ashdns avatar Oct 06 '20 05:10 ashdns

I can confirm it's been broken since version 2.17.1.

ashdns avatar Oct 06 '20 06:10 ashdns

@arash01 does it happen with the sample app that is in the repo?

Widcket avatar Oct 06 '20 20:10 Widcket

Closing due to inactivity.

Widcket avatar Nov 13 '20 19:11 Widcket

@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 avatar Feb 11 '21 21:02 jalleyne

@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 avatar Feb 12 '21 10:02 cocojoe

@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 avatar Feb 12 '21 14:02 jalleyne

@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 avatar Feb 15 '21 16:02 laeur

@laeur I'll look into it.

Widcket avatar Feb 16 '21 02:02 Widcket

@laeur I managed to reproduce it, seems it was a regression introduced in this PR. Working on it.

Widcket avatar Feb 17 '21 02:02 Widcket

@Widcket @cocojoe thank you for taking a deeper look into this.

jalleyne avatar Feb 23 '21 13:02 jalleyne

The fix is now out in v2.22.0.

Widcket avatar Mar 10 '21 16:03 Widcket