节点webkit和Google OAuth
刚开始使用node webkit,我只是通过一个iframe加载一个网站来开始…(我知道,肮脏,但用双手和一点时间完成工作)。
<iframe src="http://somewebsite.com"></iframe>
问题是,我有Googlelogin的网站,这会在网站上popup。 出于某种原因,它不在node-webkit中,我找不到任何关于启用popup窗口的文档…
我用于Googlelogin的代码是他们在网站上提供的默认代码: https : //developers.google.com/accounts/docs/OAuth2Login
我目前没有在node-webkitconfiguration中设置任何令人兴奋的东西:
"window": { "toolbar": true, "width": 1024, "height": 768, "min_width": 300, "min_height": 300, "position": "center", "resizable": true, "show_in_taskbar": true, "icon": "www/resources/img/icon.png" },
所以我的问题是,如何从iframe启用node-webkit上的popup窗口来获取Google OAuth的工作? 在此先感谢您的帮助。
我有同样的问题,并设法通过授权节点上下文到远程站点来解决它。
只需将node-remoteconfiguration项添加到您的package.json文件即可。 (但要注意,这可能会导致一些图书馆加载不同,因为他们将检测到上下文的变化)。
{ node-remote : "*" // Or the src url of your iframe }
Googlelogin后应该工作正常。
Sicne这个已经发布的“node-remote”略有变化。 这里是一个例子:
"node-remote": "*://*",
直接链接:
- 有关从v0.12更改为v0.13的注意事项 – http://docs.nwjs.io/en/latest/For%20Users/Migration/From%200.12%20to%200.13/
- 节点远程的格式