title: Gatsby Keycloak integration
body: <p>I'm having issues trying to integrate Keycloak with a Gatsby static website.
  The purpose of the integration is letting logged users interact with components in the website (features such as: Like, Share, etc.), while the website is completely public.</p>
  <p>The Keycloak instance is on a remote server, with the realm set-up and the client added with this <a href="https://pastebin.com/rGa2TXVf" rel="nofollow noreferrer">configuration</a>.</p>
  <p>I'm using <a href="https://github.com/react-keycloak/react-keycloak-examples/tree/master/examples/gatsbyjs" rel="nofollow noreferrer">this repo</a> as reference, but I guess there are some differences because of the modules version. I'm using:</p>
  <pre><code>&quot;@react-keycloak/web&quot;: &quot;^2.1.3&quot;,
  &quot;keycloak-js&quot;: &quot;^11.0.0&quot;,
  </code></pre>
  <p>Here's my gatsby-browser.js:</p>
  <pre class="lang-js prettyprint-override"><code>import React from 'react'
  import { node } from 'prop-types'
  import Keycloak from 'keycloak-js'
  import { KeycloakProvider } from '@react-keycloak/web'
  
  const keycloak = new Keycloak({
    realm: 'myRealm',
    url: 'https://myKeycloak.com/auth',
    clientId: 'myClientId'
  })
  
  const Loading = () =&gt; &lt;div&gt;getting ready...&lt;/div&gt;
  
  const wrapRootElement = ({ element }) =&gt; {
    return (
      &lt;KeycloakProvider
        keycloak={keycloak}
        initConfig={{
          promiseType: 'native',
          onLoad: 'check-sso',
          silentCheckSsoRedirectUri:
            window.location.origin + '/silent-check-sso.xhtml'
        }}
        LoadingComponent={&lt;Loading /&gt;}
      &gt;
        {element}
      &lt;/KeycloakProvider&gt;
    )
  }
  
  wrapRootElement.propTypes = {
    element: node
  }
  
  const _wrapRootElement = wrapRootElement
  export { _wrapRootElement as wrapRootElement }
  
  </code></pre>
  <p>I'm getting stuck in the <code>getting ready...</code> page, while on the network tools I get:</p>
  <pre><code>GET https://myKeycloak.com/auth/realms/myRealm/protocol/openid-connect/3p-cookies/step1.html
  Status 404
  Not Found
  </code></pre>
  <p>Do you have any tip for me?
  Thanks in advance, have a good day</p>