Error: The response type is not supported by the authorization server. Configured response types: [code]

Hi All, I have seen some posts relating to this but the suggested fix’s are not working for me.

I am implementing Okta Web application with server-side authentication. The server is set up using express.

I am getting this error: Error: The response type is not supported by the authorization server. Configured response types: [code]

Okta signin page does not load, always falls with the error.

Code snippet.

`const oidc = new ExpressOIDC({
  issuer: oktaIssuer,
  client_id: oktaClientId,
  client_secret: oktaClientSecret,
  redirect_uri: redirectUri,
  scope: 'openid profile email',
  response_type: 'code',
  appBaseUrl: appBaseUrl,
  routes: {
    login: {
      path: '/login',
    },
    loginCallback: {
      path: '/login/callback',
      handler: (req, res, next) => {
        console.log('Callback route accessed');
        console.log('Session data before callback:', req.session);
        next();
      },
    },
  },
});

`
![Capture|643x500](upload://xQtZ1Tnp9Bdilnn7EPS5jFSa8vi.jpeg)

Any help would be appreciated, thank you

Hi,
A couple things to check:
When you access your express app and get redirected to Okta, using chrome developer tools on the network tab do you see a complete url?
Auth code may not be configured on your app in Okta. Double check that.

Cheers,
Adrian

1 Like

Hello @aidand,

Generally when we see this error it’s because your org is not configured to grant the authorization code. If you’re using the Org Authorization Server this setting will be in your General Settings for your app: Create OIDC app integrations | Okta

If you are using the default or another custom Authorization Server, you will also need to grant the appropriate grant in the access policies there: Create access policies | Okta

1 Like

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