Tag: popup

节点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的工作? 在此先感谢您的帮助。

passport.js,在popup窗口中进行身份validation后,closures它并redirect父窗口

在我的node.js express应用程序中,我使用passport.js集成了Facebook身份validation。 我可以在popup窗口中打开Facebooklogin页面,然后login。 在这个阶段,redirect发生在popup窗口中。 但我需要closurespopup窗口,并在父窗口中进行redirect( 即父窗口将redirect )。 我要在这里粘贴完整的代码, 虽然我认为主要问题是在模板文件(.ejs)中。 在SO里,我找不到类似的问题。 // Passport session setup. passport.serializeUser(function(user, done) { done(null, user); }); passport.deserializeUser(function(obj, done) { done(null, obj); }); // Use the FacebookStrategy within Passport. passport.use(new FacebookStrategy({ clientID: config.facebook_api_key, clientSecret:config.facebook_api_secret , callbackURL: config.callback_url }, function(accessToken, refreshToken, profile, done) { console.log(" id = "+profile.id); process.nextTick(function () { //Check whether […]