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的更多相关文章

  1. Web API与OAuth:既生access token,何生refresh token

    在前一篇博文中,我们基于 ASP.NET Web API 与 OWIN OAuth 以 Resource Owner Password Credentials Grant 的授权方式( grant_t ...

  2. ASP.NET OAuth:解决refresh token无法刷新access token的问题

    最近同事用iOS App调用Open API时遇到一个问题:在access token过期后,用refresh token刷新access token时,服务器响应"invalid_gran ...

  3. ASP.NET OWIN OAuth:遇到的2个refresh token问题

    之前写过2篇关于refresh token的生成与持久化的博文:1)Web API与OAuth:既生access token,何生refresh token:2)ASP.NET OWIN OAuth: ...

  4. ASP.NET OWIN OAuth:refresh token的持久化

    在前一篇博文中,我们初步地了解了refresh token的用途——它是用于刷新access token的一种token,并且用简单的示例代码体验了一下获取refresh token并且用它刷新acc ...

  5. Handle Refresh Token Using ASP.NET Core 2.0 And JSON Web Token

    来源:   https://www.c-sharpcorner.com/article/handle-refresh-token-using-asp-net-core-2-0-and-json-web ...

  6. [Java] - Google API调用

    由于Google已经完成被墙,要上Google必需使用代理或VPN. 这里使用的是Google的GoAgent代理做开发.(如何使用GoAgent,这里不写了,忽略500字.....) 本地测试的Go ...

  7. Google API v3 设置Icon问题处理

    1.查看API实现 //虽然比较符合API实现的思想但这个没法; //会产生Uncaught TypeError: undefined is not a function //google API n ...

  8. ecshop使用Google API及OAuth2.0登录授权(PHP)

    一.申请clientID https://console.developers.google.com/project 二.开启Google+ API权限 https://console.develop ...

  9. Android BLE与终端通信(五)——Google API BLE4.0低功耗蓝牙文档解读之案例初探

    Android BLE与终端通信(五)--Google API BLE4.0低功耗蓝牙文档解读之案例初探 算下来很久没有写BLE的博文了,上家的技术都快忘记了,所以赶紧读了一遍Google的API顺便 ...

随机推荐

  1. 转: React系统的入门系统

    评注:React系统的入门系统. 转:  http://www.infoq.com/cn/search.action?queryString=%E6%B7%B1%E5%85%A5%E6%B5%85%E ...

  2. 配置JDK和TOMCAT

    配置JDK 1.先从官网下载最新的JDK安装包,然后安装.安装过程中会询问是否再装JRE,因为JDK中已经包含JRE,所以不必重复安装. 2.注意安装的路径名最好不要有中文或者空格出现. 3.在系统环 ...

  3. JavaScript之返回顶部

    为了弄这个Hexo,今天又是坐在电脑面前待了一天( ⊙ o ⊙ ),老是出问题,在百度上也试验了很多方法,还是没弄好,诶...身心疲惫甚是乏累啊~~~ 算了,这个Hexo先不弄,还是安分点吧,在Hex ...

  4. c# SQL CLR 之一

    CLR就是公共运行时,本文就对c#编写SQL StoredProcedures的过程进行简单讲解. [步骤] 2. 3. 7.打开设置 8. 注意删除方式:注意删除Assembly时,一定要先把引用此 ...

  5. Facade模式和Mediator模式

    相同的目的:把某种策略施加到另一组对象上. Facade从上面施加策略. 其使用是明显且受限的.当策略涉及范围广泛并且可见时. 约定的关注点.都同意使用Facade而不是隐藏于其下的对象. Media ...

  6. 使用Linux系统中的SSH服务

    使用Linux系统中的SSH服务 1.SSH服务应用场景 ① 可以实现对文件的上传与下载 ② 实现远程管理Linux 2.安装SSH服务器 服 务:sshd 位 置:光盘2 软 件:openssh-s ...

  7. 远程连接postgres,出现server doesnt listen

    已修改pg_hdb.conf中的 # IPv4 local connections:     host    all             all             127.0.0.1/32 ...

  8. 洛谷 P1195 口袋的天空

    题目背景 小杉坐在教室里,透过口袋一样的窗户看口袋一样的天空. 有很多云飘在那里,看起来很漂亮,小杉想摘下那样美的几朵云,做成棉花糖. 题目描述 给你云朵的个数N,再给你M个关系,表示哪些云朵可以连在 ...

  9. (一)Qt界面设计布局

    Qt提供四种布局: 这种布局生成的格局比较单一,这时候需要另外两个填充控件,来生成整行或整列的格式. 注意:使用Spacers控件时,必须要放在layouts中的布局中,否则无法保存. 示例: 1.往 ...

  10. Standford CoreNLP

    Stanford CoreNLP Stanford CoreNLP提供一组自然语言处理的工具.这些工具可以把原始英语文本作为输入,输出词的基本形式,词的词性标记,判断词是否是公司名.人名等,规格化日期 ...