遵循https://scalac.io/blog/user-authentication-keycloak-1/,我创建了领域,并将json放在了react应用程序中。但当需要时,它不会初始化,从而产生以下错误:
"No routes matched location "/undefined/protocol/openid-connect/3p-cookies/step1.html" keyclock.js:
{
"realm": "ReactTaskApp",
"auth-server-url": "http://localhost:8080/",
"ssl-required": "external",
"resource": "react-client",
"clientId": "react-client",
"public-client": true,
"confidential-port": 0
}如何解决这个错误?
发布于 2022-10-10 17:42:59
我的团队和我遇到了同样的问题,并且发现当把配置传递给keycloak.js时,所有的属性名都应该是camelCased!另一件事是(如果我没记错的话),您应该只传递authServerUrl作为属性名,而不是url。上面写着:
{
"realm": "ReactTaskApp",
"url": "http://localhost:8080/",
"sslRequired": "external",
"resource": "react-client",
"clientId": "react-client",
"publicClient": true,
"confidentialPort": 0
}https://stackoverflow.com/questions/74018440
复制相似问题