ai-dial-chat
ai-dial-chat copied to clipboard
Keycloak auth error: expected 200 OK, got: 301 Moved Permanently
EPAM AI DIAL chat version
0.10.0
What happened?
While trying to enable OIDC connection with keycloak I face this issues:
[next-auth][error][OAUTH_CALLBACK_ERROR]
https://next-auth.js.org/errors#oauth_callback_error expected 200 OK, got: 301 Moved Permanently {
error: OPError: expected 200 OK, got: 301 Moved Permanently
at processResponse (/app/node_modules/openid-client/lib/helpers/process_response.js:41:11)
at Client.grant (/app/node_modules/openid-client/lib/client.js:1354:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Client.callback (/app/node_modules/openid-client/lib/client.js:493:24)
at async Object.request (/app/.next/server/chunks/796.js:1:588)
at async oAuthCallback (/app/node_modules/next-auth/core/lib/oauth/callback.js:101:24)
at async Object.callback (/app/node_modules/next-auth/core/routes/callback.js:52:11)
at async AuthHandler (/app/node_modules/next-auth/core/index.js:208:28)
at async NextAuthApiHandler (/app/node_modules/next-auth/next/index.js:22:19)
at async NextAuth._args$ (/app/node_modules/next-auth/next/index.js:108:14) {
name: 'OAuthCallbackError',
code: undefined
},
providerId: 'keycloak',
message: 'expected 200 OK, got: 301 Moved Permanently'
}
Here is my vars:
- name: APP_BASE_ORIGIN
value: dial-chat.mydomain.com
- name: AUTH_KEYCLOAK_CLIENT_ID
value: dial-chat
- name: AUTH_KEYCLOAK_HOST
value: https://dial-keycloak.mydomain.com/realms/dial
- name: AUTH_KEYCLOAK_NAME
value: dial
- name: AUTH_KEYCLOAK_SECRET
value: keycloak_client_secret
- name: DIAL_API_HOST
value: http://dial-core.dial.svc.cluster.local
- name: NEXTAUTH_URL
value: https://dial-chat.mydomain.com
- name: THEMES_CONFIG_HOST
value: https://dial-themes.mydomain.com
In lauching logs I see:
⚠ Invalid next.config.js options detected:
⚠ The value at .basePath must be a string but it was an object.
⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config
▲ Next.js 13.5.4
- Local: http://localhost:3000
Confidential information
- [X] I confirm that do not share any confidential information