title: Configuring Keycloak in React JS Frontend to provide secret key
body: <p>My keycloak client is configured with access type : confidential and I have generated the secret key.</p>
  <p>In my react JS app I am using the provider:
  <code>import { ReactKeycloakProvider} from '@react-keycloak/web';</code></p>
  <p>In the ReactKeycloakProvider I am passing <strong>authClient &amp; initOptions</strong> as props which are as follows:</p>
  <pre><code>authClient: Keycloak({ clientId: 'secured-client', 
  realm: 'the-realm', 
  url: REACT_APP_KEYCLOAK_AUTH_DOMAIN, }), 
  initOptions:{ 
   onLoad: 'check-sso', messageReceiveTimeout: 2000, 
  }
  </code></pre>
  <p>If I launch my app with keycloak server configured with access type confidential, it gives 401 error :
  <code>error: &quot;unauthorized_client&quot; error_description: &quot;Client secret not provided in request&quot;</code></p>
  <p>Taking reference of the keycloak docs, how the java adapters can be configured <a href="https://www.keycloak.org/docs/latest/securing_apps/index.html#_java_adapter_config" rel="nofollow noreferrer">link here</a>,
  I tried putting credentials property in the <strong>initOptions</strong> and also <strong>clientSecret</strong> with the key. But it doesn't seem to work.</p>
  <p>What is the right way to pass the secret key from a frontend application?</p>