Popup blocking the gdrive authorization in chrome

前端 未结 5 1643
太阳男子
太阳男子 2020-12-18 09:23

So, the problem is that popup blocking the window open even if it is done by a user action, click for example..

gapi.auth.authorize({
   client_id: this.clie         


        
5条回答
  •  生来不讨喜
    2020-12-18 10:10

    Try this:

    Include an onload event in your call to client.js

    Call gapi.auth.init from the onload function:

    function handleClientLoad() { window.setTimeout(gapi.auth.init,1); }

    In your authorize configuration set immediate: false.

    Check that 1. is below 2. in the flow of the page.

提交回复
热议问题