magiclabs / magic-ios

MagicSDK library for IOS
Apache License 2.0
7 stars 8 forks source link

Issue with loginWithEmailOTP - No Longer Presenting Enter Code UI #21

Closed rig-0 closed 1 year ago

rig-0 commented 1 year ago

Describe the bug Calling loginWithEmailOTP no longer presents the UI to enter your code. When I call loginWithEmailOTP, I still see that the code is delivered to my email, but the UI is no longer being presented on the app side to allow me to enter it.

I've recently updated my Xcode to 14.2, and my device is on iOS 16.3.1. My Magic SDK version used to be 3.0. I tried updating it to 6.2, but that didn't address it.

I've created a barebones project to test that it's not something in my app that's causing it. It's a simple view controller with a LOGIN button. I initialize Magic with my clientID in AppDelegate. In the viewController, I have a LOGIN button that calls

        let configuration = LoginWithEmailOTPConfiguration(email: self.email)
        magic.auth.loginWithEmailOTP(configuration) { response in

            guard let token = response.result
            else {
                return print("Error:", response.error.debugDescription)
            }

            print("[Generated New Token]", token)
        }

That logic will deliver the code to my email but will not present the enter code UI. If instead I use loginWithMagicLink, I see the UI as expected.

To Reproduce Steps to reproduce the behavior:

  1. Create a barebones project that initializes Magic in AppDelegate, with a viewController with a button that calls loginWithEmailOTP.
  2. Press the LOGIN button.
  3. See that you are not presented with Enter OTP Code UI.
  4. See that you receive the email in your inbox.

Expected behavior I expect to see the UI that allows me to enter my OTP code.

Environment

am-hernandez commented 1 year ago

Hello @rig-0 thank you for reporting this issue. We are currently investigating and will follow up here.

rig-0 commented 1 year ago

FWIW, our Android developer just confirmed that he's seeing similar behavior. Please let us know if you need more details from his end.

am-hernandez commented 1 year ago

@rig-0 Thank you for that. We should have a resolution pushed in the next hour.

am-hernandez commented 1 year ago

Hello @rig-0 The changes were pushed recently. Would you mind check on this and let us know if you are still experiencing issues or if it now resolved for you?

rig-0 commented 1 year ago

It appears resolved on iOS @am-hernandez. Thanks so much to the team for your super fast help on this issue. Much appreciated. We will let you know if something else comes up but for now we can consider this resolved.