未设置httponly cookies

未设置httponly cookies,cookies,single-sign-on,keycloak,Cookies,Single Sign On,Keycloak,使用此设置: 身份验证服务器(密钥斗篷):localhost:9990 后端:localhost:8080 前端(SPA):localhost:3000 用户可以通过将用户名+密码发送到以下地址“登录”/在SPA上获得令牌: http://localhost:9990/auth/realms/w/protocol/openid-connect/token 然后,我调用auth服务器上的另一个url,该url应设置Keyclope为SSO/RememberMe所需的Cookie(它应设置一些

使用此设置:

  • 身份验证服务器(密钥斗篷):
    localhost:9990
  • 后端:
    localhost:8080
  • 前端(SPA):
    localhost:3000
用户可以通过将用户名+密码发送到以下地址“登录”/在SPA上获得令牌:

http://localhost:9990/auth/realms/w/protocol/openid-connect/token
然后,我调用auth服务器上的另一个url,该url应设置Keyclope为SSO/RememberMe所需的Cookie(它应设置一些
HttpOnly
Cookie):

.then(t=>keydeposeInstance.init)({
令牌:t.access_令牌,
刷新令牌:t.refresh\u令牌,
checkLoginFrame:false,//需要使用令牌初始化
})
。然后((已验证)=>{

console.log('auth',authenticated);//应用程序>cookies,但不幸的是没有显示cookies。为什么?我可以对此做些什么?

我缺少
凭据:'include'
用于
获取调用:

return fetch('http://localhost:9990/auth/realms/w/custom-sso-provider/sso', { headers: { Authorization: `Bearer ${keycloakInstance.token}` }, credentials: 'include' })
return fetch('http://localhost:9990/auth/realms/w/custom-sso-provider/sso', { headers: { Authorization: `Bearer ${keycloakInstance.token}` }, credentials: 'include' })