angular-auth-oidc-client icon indicating copy to clipboard operation
angular-auth-oidc-client copied to clipboard

[Bug]: isCallbackFromSts doesn't respect trailing slash in the url

Open rammba opened this issue 1 year ago • 0 comments

Version

18.0.2

Please provide the exception or error you saw

No exceptions nor errors, just failed login flow.

Steps to reproduce the behavior

My app is using Azure B2C authentication provider. In the B2C configuration I have auth redirectUrl without trailing slash, but looks like B2C adds it implicitly. B2C config

I've updated v18.0.1 to v18.0.2 because I had this line "angular-auth-oidc-client": "^18.0.1", in package.json file. After update, my login flow stopped working without console errors and exceptions. After bunch of hours I figured out that there is a trailing slash in the URL which causing the problem: Example

I wasn't aware that checkRedirectUrlWhenCheckingIfIsCallback setting was introduced, and less that it's enabled by default. I solved the problem using v18.0.1 explicitly even that I know setting it to false would also work.

This flag is introduced in #1976. @erichjsonfosse @FabianGosebrink can you please take a look if this case can be solved/fixed.

rammba avatar Nov 01 '24 11:11 rammba