我们在 iframe 中嵌入了 Google OAuth 按钮。当用户使用此 iframe 加载页面时,单击该 iframe 中的 Google 按钮,window.gapi.auth2.getAuthInstance().signIn 将触发并出现新窗口。用户输入电子邮件、密码并提交表单。窗口关闭,但此函数没有回调。
它仅在主窗口域与 iframe 域不同时重现!
你可以在这里试试 - https://sparklejobs.com/localhost-universal/
主窗口域 - sparklejobs.com 带有 Google 按钮的 iframe 窗口 - staging-web.good.co