Angular Causing AuthSdkError: The redirectUri passed to /authorize must also be passed to /token

Hi
I am using Angular signing-widget and Angular SDK to authenticate.
After entering my credentials, the callBackComponents gives me this error into the browser.

AuthSdkError: The redirectUri passed to /authorize must also be passed to /token

I am not sure how to fix it and also no issue found in the forum with the same problem.

Here is my login.component
this.signIn = new OktaSignIn({
baseUrl: environment.oktaConfig.issuer.split(’/oauth2’)[0],
clientId: environment.oktaConfig.clientId,
redirectUri: environment.oktaConfig.redirectUri, //localhost/idp/okta/auth/callback
authParams: {
pkce: environment.oktaConfig.pkce, //true
responseMode: ‘query’,
issuer: environment.oktaConfig.issuer,
display: ‘page’,
scopes: environment.oktaConfig.scopes,
},
})

It looks like you’re trying to pass multiple redirect URIs. We don’t support that.

I see the same error in React. It is possible to reproduce with the sample app at https://github.com/okta/samples-js-react/tree/master/custom-login

Even single redirectURI doesnt work. Just got a word back from Dev support that it is a bug in okta-auth-js 3.1.2 and okta-signin-widget doesnt support that.
okta-auth-js 3.1.3 has just been released to fix it.

1 Like

Hi
I have also the same issue on VueJS SDK, but for this SDK, the curent okta-auth-js is not the 3.1.3 but 3.1.0…

It is possible to update it ?

Thanks,

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