iframe/popup 中的 Google oauth2 授权 [英] Google oauth2 authorization in iframe/popup

查看:63
本文介绍了iframe/popup 中的 Google oauth2 授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序在 iframe 中运行(注入了 chrome 扩展).该应用程序需要使用 google oauth2 向用户询问一些权限.重定向到 oauth-page 不能直接在 iframe 中工作,由于 X-Frame-Options: SAMEORIGIN 在 https://accounts.google.com/o/oauth2/auth

My application works in iframe (injected with chrome extension). The application needs to ask user some permissions with google oauth2. Redirecting to oauth-page does not work directly in iframe, because of X-Frame-Options: SAMEORIGIN at https://accounts.google.com/o/oauth2/auth

有没有办法在弹出窗口中显示页面?

Is there a way to display the page in popup?

推荐答案

Google+ 登录 对于您的情况似乎是一个不错的选择.它带有一个按钮,可在弹出窗口中触发身份验证流程.

Google+ Sign-in seems a good choice for your case. It comes with a button that triggers the auth flow in a popup window.

这篇关于iframe/popup 中的 Google oauth2 授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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