Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-14921

React with Keycloak - 404 Error while refresh the application

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 11.0.0
    • Fix Version/s: None
    • Component/s: Adapter - JavaScript
    • Labels:
      None
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      In my production environment, My  React application user authentication happening with keycloak application. For authentication, I used the javascript adapter in my react application as below.

       

      keycloak.init({ onLoad: "login-required" }).then((authenticated) =>

      {       this.setState(\{ keycloak: keycloak, authenticated: authenticated }

      );

          });

       In my development environment, everything is working fine. Same react project I took to build and deployed in openshift container with Nginx.

       When I open the application it's taken me to key cloak user login authentication and then it's redirecting to the react application this is working fine.

       whenever I press F5(refresh) the react application validating the user authentication session with keycloak it's fine. But some times I get 404 Error from the keyclaok.

       

       If you see in the screenshot(URL) after the hostname /app/home is react application context. but I don't know why this context is checking with keyclaok.

       In chrome browser frequently this is happening but in firefox rare cases. I cleared the browser session, cookies &catches everything but no luck.

       I am stuck with this, If anyone helping in this, it will be a great help for me.

       Thanks in advance 

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mohanmca01 mohan mohan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: