gpt4 book ai didi

javascript - 如何为accounts.google.com身份验证链接(OAuth)设置X-Frame-Options => ALLOWALL?

转载 作者:行者123 更新时间:2023-11-28 07:31:51 25 4
gpt4 key购买 nike

我有一个带有 Google OAuth 身份验证链接的网站。该网站通过 iframe 显示在另一个网站上。当我点击 Google OAuth 链接时,它会将我重定向到

https://accounts.google.com/ServiceLogin?service=lso&passive=1209600&continue=https://accounts.google.com/o/oauth2/auth?scope% ......

并返回带有标题x-frame-options:DENY 的响应

和一个错误

Refused to display 'https://accounts.google.com/ServiceLogin?service=lso&passive=1209600&contin…iFDca2N1r2ts6Lm8zTYJ7Pcj9938uKAEyFOgJCaYaq1wNz_yGrWE59Hv73BWk&sarp=1&scc=1' in a frame because it set X-Frame-Options to DENY.

但我确实需要能够在框架中显示身份验证过程。怎么解决呢?

最佳答案

你不能也永远不会。这是一个安全风险,accounts.google.com 和身份验证是一个高度安全的领域。

关于javascript - 如何为accounts.google.com身份验证链接(OAuth)设置X-Frame-Options => ALLOWALL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29045985/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com