oidc-client-ts icon indicating copy to clipboard operation
oidc-client-ts copied to clipboard

UserManager.signinRedirectCallback response_mode set "fragment",Error “Expected code in response”

Open binyet opened this issue 2 years ago • 3 comments

Dear, When I use method "UserManager.SigninRedirectCallback" to use code get token, it's catch an Error, is "Expected code in response". The first img is Debug Params, Debug

The Second img is SourceCode

SourceCode

when I use hash router in vue, method of 'URLSearchParams' unable to recognize the char of '#'.

binyet avatar Dec 04 '23 14:12 binyet

see https://github.com/authts/oidc-client-ts/blob/main/docs/index.md#hash-mode-router-spa

pamapa avatar Dec 04 '23 15:12 pamapa

Thank you for your solution. But IdentityServer4 Application return the callback url. We can not modify the callback url.

binyet avatar Dec 05 '23 00:12 binyet

Thank you for your solution. But IdentityServer4 Application return the callback url. We can not modify the callback url.

I assume you are calling mgr.signinCallback(), thus you can modify the url parameter of it...

pamapa avatar Dec 07 '23 13:12 pamapa