Not receiving Google OAuth refresh token

前端 未结 14 1437
佛祖请我去吃肉
佛祖请我去吃肉 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

    Rich Sutton's answer finally worked for me, after I realized that adding access_type=offline is done on the front end client's request for an authorization code, not the back end request that exchanges that code for an access_token. I've added a comment to his answer and this link at Google for more info about refreshing tokens.

    P.S. If you are using Satellizer, here is how to add that option to the $authProvider.google in AngularJS.

提交回复
热议问题