码迷,mamicode.com
首页 > Windows程序 > 详细

google api , the problem of null refresh token

时间:2014-12-21 21:50:16      阅读:195      评论:0      收藏:0      [点我收藏+]

标签:

 

http://stackoverflow.com/questions/10827920/google-oauth-refresh-token-is-not-being-received

The refresh_token is only provided on the first authorization from the user. Subsequent authorizations, such as the kind you make while testing an OAuth2 integration, will not return the refresh_token again. :)

  1. Go to your account security settings: https://www.google.com/settings/u/1/security.
  2. Click the edit button next to "Authorizing applications and sites".
  3. Then click "Revoke Access" next to your app.
  4. The next OAuth2 request you make will return a refresh_token.

Alternatively, you can add the query parameter approval_prompt=force to the OAuth redirect (see Google‘s OAuth 2.0 for Web Server Applications page).

This will prompt the user to authorize the application again and will always return a refresh_token.

google api , the problem of null refresh token

标签:

原文地址:http://www.cnblogs.com/zyip/p/4177002.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!