无法在Keycloak上查看登录页面。

huangapple go评论73阅读模式
英文:

Unable to view the Login Page on keycloak

问题

我正在处理将React应用程序与KeyCloak集成的工作。我已经在我的本地机器上安装了KeyCloak服务器版本11.0.2。我能够访问管理登录页面并创建管理员用户。我还使用KeyCloak创建了一个自定义客户端和带有凭据的用户。我的React应用程序托管在本机的9000端口,而KeyCloak则托管在8080(默认)端口。现在,当我重定向到我的应用程序URL时,它会自动重定向到以下URL:

http://localhost:8080/auth/realms/{Custom_realm}/protocol/openid-connect/auth?client_id={Custom_Client}&redirect_uri=http%3A%2F%2Flocalhost%3A9000%2F&state=r8yy83fdgd-27f8-4aa9-a679-01sfdsgd9&response_mode=fragment&response_type=code&scope=openid&nonce=27fedfgf89-66be-4484-bbcc-aabb4saddc4

该URL显示"We are Sorry",不允许我输入所需的用户凭据。

不确定为什么登录页面没有加载。有人可以帮我解决这个问题吗?此外,请提供将KeyCloak与应用程序集成并创建新Realm和客户端所需的基本配置。

英文:

I am working over integration of React application with KeyCloak. I have installed the keycloak server version 11.0.2 over my local machine. I am able to access the administrative login and create the admin user. I have also created a custom client and user with credentials using the keycloak. My react application is hosted over port 9000 of my machine and keycloak over 8080 (default) port. Now, when I am redirecting to my application URL it is automatically redirecting to the below url:

http://localhost:8080/auth/realms/{Custom_realm}/protocol/openid-connect/auth?client_id={Custom_Client}&redirect_uri=http%3A%2F%2Flocalhost%3A9000%2F&state=r8yy83fdgd-27f8-4aa9-a679-01sfdsgd9&response_mode=fragment&response_type=code&scope=openid&nonce=27fedfgf89-66be-4484-bbcc-aabb4saddc4
The url is rendering We are Sorry and not allowing me to enter the credentials required for the user.

无法在Keycloak上查看登录页面。

Not sure why is the login page not landing.
Can anyone help me out with this?? Also provide the basic level of configurations required for Keycloak for integrating it with the application and creating a new Realm and client.

答案1

得分: 1

问题已解决。代码中的Realm名称与在Keycloak中创建的名称不匹配。在Keycloak中我创建了一个名为UI_Realm的Realm,而在代码中它被写作UI_realm。

英文:

Issue was resolved. There was a mismatch of the Realm name in the code as well as the one created in Keycloak. In Keycloak I created UI_Realm while in code it was written as UI_realm

huangapple
  • 本文由 发表于 2020年9月30日 16:36:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/64133875.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定