执行 oauth 时如何创建弹出窗口?

2022-01-20 00:00:00 oauth twitter popup javascript facebook

我想通过使用弹出窗口来完成 lifestream 和其他网站对 oauth 身份验证所做的事情.他们打开一个弹出窗口,不知何故没有被弹出窗口阻止程序阻止,并使他们的网站变灰.然后在允许 oauth 访问时,它说重定向回原始站点并终止弹出窗口并将站点恢复为正常颜色.我将如何去做这样的事情?如果我发布了任何内容,我就不应该没事,因为所有这些帐户都是假的.

I'm would like to do what lifestream and other sites have done with oauth authentication by using a pop up window. They open a popup window which somehow wasn't blocked by the popup blocker and grey out their site. Then upon allowing oauth access it says redirecting back to original site and kills the popup and returns the site to normal color. How would I go about doing something like this? If I posted anything I shouldn't have its alright because all these accounts are bogus anyway.

推荐答案

问题是,这不是弹窗.这就是通常所说的灯箱.一个 js 脚本,如 fancybox、lightbox 和许多其他脚本.您基本上可以在绝对位置和高 z-index 的 div 中打开一个 iframe,然后在下面放置一个叠加层.

The thing is, this is not a pop-up window. It's what usually called lightbox. A js script like fancybox, lightbox and many others. You basically can open an iframe in a div with a absolut position and high z-index, then put an overlay underneath.

相关文章