Okta redirect URL error in browser for first time

This is for an iOS app. When trying to log in using Octa, an error is getting in safari or any browser. But it is working for the second time onwards.
Below is the scenario,
Once redirected to the browser from the iOS App and after entering the username and password the browser gives a message saying it can’t find the URL. Exit the app and try to log in again, the browser shows the pop-up message to open the app, and once tap on the allow button in the pop up it is redirected back to the application.
Is this an issue from the iOS side or Octa?
Passing the redirect URL from the iOS app and opening the Octa login page successfully. The issue is getting after entering the credentials and tapping on the sign-in button.

Hello @vinod,

From the description it might be an issue with not having a scheme registered for your native application that the browser can use to pass control back to the app, from here.

In order to redirect back to your application from a web browser, you must specify a unique URI to your app. To do this, open Info.plist in your application bundle and set a URL Scheme to the scheme of the redirect URI.

For example, if your Redirect URI is com.okta.example:/callback, the URL Scheme will be com.okta.example.

  • Are you using any of the Okta iOS SDKs, if so which one(s)?
  • Can you provide screen shots of what you see when you get the error, and then what you see when you launch the app again and get a pop-up. (I assume this is not the OAuth consent message from Okta which would be from your Okta domain, but a native pop-up?)

Thank You,

Hello @erik,
First of all this issue is for MacOS app not for the iOS, it is a typo.
This app is using App Auth SDK.
Scheme URL is already added.
I have attached the screenshot for the first time and second time login.

Please check this issue ASAP

The issue is resolved.

I have updated the AppAuth and removed the deprecated code.