You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What Version of the libraray are you using?
I am using 12.0.3, but the error in the implementation of getUrlParameter is the same in the 13 branch and the main branch.
Describe the bug getUrlParameter in the UrlService does not parse properly oauth request with a response_type of fragment.
( https://github.com/damienbod/angular-auth-oidc-client/blob/main/projects/angular-auth-oidc-client/src/lib/utils/url/url.service.ts#L26 )
specifically, it will skip the first parameter, so if the oauth provider redirect to https://mysite.com/#code=abc&state=123&... , the library will return a no code in url error.
This produce a looping behavior that will eventually resolve only when the first fragment is not required in the case of an openid provider returning fragments in an indetermined order, or will never work if the first fragment is always "code" or "state".
To Reproduce
Receive an oauth response in response_mode = 'fragment' with the first fragment being a required parameter for the oauth flow.
Hey, thanks. Can you open a PR and write a failing test for it on a branch, then we can fix it accordingly. The method is public so it should be easy to test it. Thanks!
What Version of the libraray are you using?
I am using 12.0.3, but the error in the implementation of
getUrlParameter
is the same in the 13 branch and the main branch.Describe the bug
getUrlParameter
in the UrlService does not parse properly oauth request with a response_type of fragment.( https://github.com/damienbod/angular-auth-oidc-client/blob/main/projects/angular-auth-oidc-client/src/lib/utils/url/url.service.ts#L26 )
specifically, it will skip the first parameter, so if the oauth provider redirect to
https://mysite.com/#code=abc&state=123&...
, the library will return ano code in url
error.This produce a looping behavior that will eventually resolve only when the first fragment is not required in the case of an openid provider returning fragments in an indetermined order, or will never work if the first fragment is always "code" or "state".
To Reproduce
Receive an oauth response in
response_mode = 'fragment'
with the first fragment being a required parameter for the oauth flow.Expected behavior
The implementation should properly read the first fragment parameter.
https://github.com/damienbod/angular-auth-oidc-client/blob/main/projects/angular-auth-oidc-client/src/lib/utils/url/url.service.ts#L26
The text was updated successfully, but these errors were encountered: