okta / okta-angular

Angular SDK for Okta's OIDC flow
https://github.com/okta/okta-angular
Other
45 stars 31 forks source link

Redirect Uris no longer include baseHref. #85

Open dbrink opened 2 years ago

dbrink commented 2 years ago

I'm submitting a:

Current behavior

If an angular app is built with a baseHref, redirect Uris for signin and singout are not relative to this path when using OktaAuthGuard or signInWithRedirect.

Expected behavior

In v3 the redirect Uris were built using prepareExternalUrl which added the baseHref path. This appears to have been removed.

Minimal reproduction of the problem with instructions

Build angular app with baseHref. Serve on /base ng build --base-href /base

Configure okta to use a redirectUri without the base path.

redirectUri: '/login/callback'

Trigger a sign-in redirect and the redirectUri will be /login/callback. This should trigger a 404 since the web app understanda the callback route as /base/login/callback.

Environment

Configuration

oleksandrpravosudko-okta commented 2 years ago

Thanks for the report @dbrink.

We will have this investigated and fixed. Internal ref: OKTA-465065