Using the Angular SDK in an Ionic App

I looked into the URL that was being loaded by the login call and I saw that it had this in it:

&redirect_uri=capacitor://pdx/com.oktapreview.myorg:/callback

so it is putting capacitor in there automatically.

I’m assuming the “pdx” is there because that is specified in our capacitor.config.ts here:

server: {
       "hostname": "pdx"
}

so what I then tried was adding “capacitor://pdx/com.oktapreview.myorg:/callback” as one of the Sign In Redirect URIs on our Okta app.

When I tried this I was able to open the OKTA login screen but after entering a username and password I then get the message

Open this page in "MyAppName" with Cancel and Open buttons i.e it is trying to open a new page rather than directing back. So I'm sort of back where I started.

Any further help would be appreciated!

I will go back to using the ion-appauth library if you think that is better suited to Ionic/Capacitor although the problem I hit with that was that I was unable to pass an email address over at the point of login (or at least I could not see how to).