okta.handleRedirect() is failing

Hi,

For our product we were using the okta sdk 3.x, now I tried to upgrade it with the latest one. but earlier there was okta.service.ts and we used handleAuthentication() but now it is replaced with handleRedirect(). It is working fine in few of my environments/servers but when I try to deploy the same code in the server where we have base href with webcdn url, it is failing at okta.handleRedirect() with given error:
SecurityError: Failed to execute ‘replaceState’ on ‘History’: A history state object with url webcdn-business .ppe .xyz/company/implicit/callback can’t be created in document with origin ‘myaccount-business .ppe .xyz.com’ and URL myaccount-business .ppe .xyz/company/implicit/callback?code=rqj0…flo&state=8dhIcr…

And if I’m checking for the okta-token-storage it is coming as {}.
My server is totally secure but not sure why it’s failing where we have webcdn. Please help.

Hi there,
Which Okta SDK are you using for this?
Thanks!

[okta-angular/lib/src/okta at master · okta/okta-angular · GitHub](github .com/ okta/okta-angular/tree/master/lib/src/okta)

From here we took the okta folder

@nikitag Can you please suggest any solutions?

Hi @oktadev-blog eagerly waiting for the solution.

Thanks

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.