Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

keycloak api /openid-connect/token shows "Client secret not provided in request" #197

Open
swetansh opened this issue Sep 9, 2022 · 1 comment

Comments

@swetansh
Copy link

swetansh commented Sep 9, 2022

Describe the bug
Getting "Client secret not provided in request" error on /token api.

To Reproduce
Steps to reproduce the behavior:

I am using @react-keycloak/ssr and my keyclock config is
const keycloakCfg = { url: 'https://test/auth', realm: 'test', clientId: process.env.clientId, clientSecret: process.env.clientSecret }
and I am adding these config like
<SSRKeycloakProvider keycloakConfig={keycloakCfg} persistor={SSRCookies(cookies)} initOptions={{ onLoad: 'login-required', checkLoginIframe: true, autoRefreshToken: true, redirectUri: 'http://localhost:3000', }} onEvent={(event, error) => { console.log('onEvent', event, error) }} isLoadingCheck={(keyclock) => { console.log(keyclock); return !keyclock.authenticated }} >
Now this calls the token api with that error mentioned above
My package file includes -
"@react-keycloak/ssr": "^3.3.0",

Expected behavior
It should call the token api without error and I should be able to authenticate user

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@pavs94
Copy link

pavs94 commented Jan 24, 2023

^ Same issue here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants