Hi, I have created an SPA type Application on Okta with the Grant Type as “Authorization Code”. When I try to use this application with the Okta Sign in Widget in React[Username/Password + Duo Push MFA], and when I finish the sign in flow, the call to the /token endpoint returns:
{
"error":"invalid_client",
"error_description":"Client authentication failed. Either the client or the client credentials are invalid."
}
The Payload of the request is:
- client_id: {My SPA App client Id}
- redirect_uri: {https://{domain}.com/login/callback
- grant_type:authorization_code
- code_verifier:9892f9cb78ddc1d27…862309eb4718ebba
- code:n7eBhBsx7u741egu0…0WtkQstjU5Irjq8
Below is my Okta Config:
export const config: OktaConfig = {
oidc: {
issuer: 'https://{domain}.okta.com/',
clientId: '{my SPA client id}',
scopes: ['openid', 'profile'],
redirectUri: `https://{domain}.com/login/callback`
},
widget: {
issuer: 'https://{domain}.okta.com/',
clientId: '{my SPA client id}',
scopes: ['openid', 'profile'],
redirectUri: `https://{domain}.com/login/callback`
}
};
Could anyone help me figure out what the issue might be?
According to Cors encountered using Okta Signin Widget - #3 by andrea, the account I have is using Okta Classic Org and Not Okta Identity Engine. And I’ll attach a screenshot of my APP Config below