Keycloak CORS issue when being redirected to login

前端 未结 3 2101
清歌不尽
清歌不尽 2021-01-11 19:15

I am trying to get the nodeJS keycloak adapter working with my Express application, but am facing a CORS issue when it tries to redirect to the login page for routes I have

3条回答
  •  青春惊慌失措
    2021-01-11 19:54

    I had the exact same problem. I am using Keycloak 6.0.1

    In my case, I had to add "enable-cors": true in keycloak.json in my Java backend server.

    Afterward, I had another issue: 401 UNAUTHORIZED. This post solved the problem

提交回复
热议问题