从Javascript(Redux)调用时,Okta会话/我返回404 [英] Okta sessions/me returning 404 when called from Javascript (Redux)

查看:96
本文介绍了从Javascript(Redux)调用时,Okta会话/我返回404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用从JavaScript调用的session/me端点(Redux动作)从Okta获取当前的Session对象,但是即使遇到活动会话,我也找不到响应.

I am trying to get the current session Object from Okta using the sessions/me endpoint called from Javascript (Redux action), but I get a not found response, even when I have an active session.

这与CORS无关,我为我的域启用了CORS.

It's not CORS related, I enabled CORS for my domain.

我能说的最好的是与Cookie相关的问题. 当我直接从浏览器中调用会话/我时,我看到浏览器将多个cookie附加到我的请求中. 当我使用javascript调用时,请求中没有附加Cookie.

The best I can tell is a cookie related issue. When I call sessions/me from the browser directly, I see the browser attaching multiple cookies to my request. When I call from javascript, there are no cookies attached to the request.

有没有一种方法可以从Javascript访问会话/我成功所需的cookie?

Is there a way, from Javascript to have access to the cookie needed for sessions/me to succeed?

推荐答案

您正在使用哪个浏览器?请查看以下页面,以了解有关支持的CORS和浏览器的更多信息: http ://developer.okta.com/docs/api/getting_started/enabling_cors.html#browser-support

Which browser are you using? Please see the following page to learn more about CORS and browsers supported: http://developer.okta.com/docs/api/getting_started/enabling_cors.html#browser-support

这篇关于从Javascript(Redux)调用时,Okta会话/我返回404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆