D.Mark
D.Mark

Reputation: 587

step1.html 404 Not Found using react-keycloak

I'm using simple React application with Keycloak for authentication mechanism (login/logout page + OpenID authorization). I have deployed Keycloak instance to Amazon EC2, and can access admin console. Everything is configured correctly in admin console. I created separate Client with access type Public.

For front end, I'm using this library (https://www.npmjs.com/package/@react-keycloak/web). Everything is according to documentation and example (https://github.com/react-keycloak/react-keycloak-examples/tree/master/examples/react-router).

But when my Keycloak instance is initializing, I don't see any redirections to keycloak's login page. And also, I see in network tab, that step1.html returned 404 Not Found. Request url is correct.

Maybe anyone faced with this issue?

const keycloakProviderConfig = {
    onLoad: 'login-required',
};

ReactDOM.render(
    <ReactKeycloakProvider
        authClient={keycloak}
        initConfig={keycloakProviderConfig}
        LoadingComponent={<div>Custom loading component</div>}
    >
        <App />
    </ReactKeycloakProvider>,
    document.getElementById('root')
);

Currently, on UI I see only "Custom loading component". That's all

Upvotes: 2

Views: 3271

Answers (1)

D.Mark
D.Mark

Reputation: 587

After investigation, I found that server version was 8.0.2, while version of keycloak-js was 11. I just downgraded keycloak-js library to 9.0.2, and everything was fixed.

Upvotes: 4

Related Questions