Okta auth with Ionic 4 not redirecting back to application after login

Implementing OKTA auth with ionic 4 using @okta/schematics, app opens in-app browser with OKTA login page and validating user also, but after login redirect to localhost:8100 not opening app after redirection, on inspector it shows http://localhost:8100/implicit/callback?code={code}&state={state} and page showing site cant be reached from actual device, using ionic serve it works perfectly.

Things should work with Ionic 4, but I’ve been using Ionic 6 lately. Did you follow these instructions for creating a native app? It sounds like you might have your app configured as a SPA app.