How do I create a popup window when doing oauth?

2019-03-16 16:01发布

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.

enter image description here

enter image description here

enter image description here

2条回答
狗以群分
2楼-- · 2019-03-16 16:15

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.

查看更多
走好不送
3楼-- · 2019-03-16 16:26

In javascript, the window.open() function will do this for you. With its api, you can set its location and get data from events occurring in it.

Popup blockers will not block this popup if it is created from a function that is executed when the user clicks a button. Popup blockers only block windows if there was no user input provided to create it.

查看更多
登录 后发表回答