Popup blocking the gdrive authorization in chrome

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

    Just adding the a reference https://developers.google.com/api-client-library/javascript/reference/referencedocs

    gapi.auth.init(callback) Initializes the authorization feature. Call this when the client loads to prevent popup blockers from blocking the auth window on gapi.auth.authorize calls.

    ps: vote up requires 15 reputation .. so couldn't vote up Ben's answer :)

提交回复
热议问题