Not receiving Google OAuth refresh token

前端 未结 14 1650
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-22 07:38

I want to get the access token from Google. The Google API says that to get the access token, send the code and other parameters to token generating page, and the response

14条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 08:18

    Using offline access and prompt:consent worked well to me:

       auth2 = gapi.auth2.init({
                        client_id: '{cliend_id}' 
       });
    
       auth2.grantOfflineAccess({prompt:'consent'}).then(signInCallback); 
    

提交回复
热议问题