Popup blocking the gdrive authorization in chrome

前端 未结 5 1635
太阳男子
太阳男子 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:22

    The first call to gapi.auth.authorize can trigger popup blockers. The best way to prevent this is to set up a user-triggered action that calls gapi.auth.authorize with immediate: false parameter.

    Quoted from the api documentation: https://developers.google.com/api-client-library/javascript/features/authentication#popup

提交回复
热议问题