HTML PHP google single sign on signout will throw “Cannot read property 'getAuthInstance' of undefined”

前端 未结 4 856
既然无缘
既然无缘 2021-02-07 04:46

I have created google single sign on by following steps mentioned in https://developers.google.com/identity/sign-in/web/sign-in

The sign in works like a charm but when

4条回答
  •  再見小時候
    2021-02-07 05:10

    Check: https://developers.google.com/identity/sign-in/web/reference#gapiauth2getauthinstance

    and in particular this part:

    gapi.auth2.getAuthInstance()

    Returns the GoogleAuth object. You must initialize the GoogleAuth object with gapi.auth2.init() before calling this method.

    For me, the problem is that I didn't call gapi.auth2.init() first

提交回复
热议问题