google api , the problem of null refresh token
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. :)
- Go to your account security settings: https://www.google.com/settings/u/1/security.
- Click the edit button next to "Authorizing applications and sites".
- Then click "Revoke Access" next to your app.
- 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的更多相关文章
- Web API与OAuth:既生access token,何生refresh token
在前一篇博文中,我们基于 ASP.NET Web API 与 OWIN OAuth 以 Resource Owner Password Credentials Grant 的授权方式( grant_t ...
- ASP.NET OAuth:解决refresh token无法刷新access token的问题
最近同事用iOS App调用Open API时遇到一个问题:在access token过期后,用refresh token刷新access token时,服务器响应"invalid_gran ...
- ASP.NET OWIN OAuth:遇到的2个refresh token问题
之前写过2篇关于refresh token的生成与持久化的博文:1)Web API与OAuth:既生access token,何生refresh token:2)ASP.NET OWIN OAuth: ...
- ASP.NET OWIN OAuth:refresh token的持久化
在前一篇博文中,我们初步地了解了refresh token的用途——它是用于刷新access token的一种token,并且用简单的示例代码体验了一下获取refresh token并且用它刷新acc ...
- 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 ...
- [Java] - Google API调用
由于Google已经完成被墙,要上Google必需使用代理或VPN. 这里使用的是Google的GoAgent代理做开发.(如何使用GoAgent,这里不写了,忽略500字.....) 本地测试的Go ...
- Google API v3 设置Icon问题处理
1.查看API实现 //虽然比较符合API实现的思想但这个没法; //会产生Uncaught TypeError: undefined is not a function //google API n ...
- ecshop使用Google API及OAuth2.0登录授权(PHP)
一.申请clientID https://console.developers.google.com/project 二.开启Google+ API权限 https://console.develop ...
- Android BLE与终端通信(五)——Google API BLE4.0低功耗蓝牙文档解读之案例初探
Android BLE与终端通信(五)--Google API BLE4.0低功耗蓝牙文档解读之案例初探 算下来很久没有写BLE的博文了,上家的技术都快忘记了,所以赶紧读了一遍Google的API顺便 ...
随机推荐
- 社区APP “钱途”漫漫
花样年曾宣称:2013年“彩生活”物业品牌收入1.85亿,毛利率超过40%:万科万客会APP.龙湖物业APP……大量房地产企业依托物业企业,纷纷瞄准移动互联网.云计算.物联网等高新科技为基础的物业服务 ...
- 1 ubuntu下装setuptools
setuptools可以让程序员更方便的创建和发布 Python 包,特别是那些对其它包具有依赖性的状况,分享以下我在ubuntu下装setuptools的过程 系统:ubuntu 语言:python ...
- Jquery判断$("#id")获取的对象是否存在的方法
如果是下面的 jquery 代码判断一个对象是否存在,是不能用的 if($("#id")){ }else{} 因为 $(“#id”) 不管对象是否存在都会返回 object . 正 ...
- iOS - UIView操作(SWift)
1. UIView 视图的渐变填充 override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after ...
- 【Unity3D】Unity3D之 注册表动态存取游戏存档——PlayerPrefs类
[Unity3D]Unity3D之 注册表动态存取游戏存档--PlayerPrefs类 1.Unity3D提供了一个用于本地持久化保存与读取的类--PlayerPrefs.工作原理非常简单,以键值对的 ...
- tar命令: 对某目录文件打tar包时,排除指定的目录或文件
如某当前目录存在以下文件或目录: 1.txt2.txt3.txtdir1dir2my2015.tarmy2016.tar 若要对当前目录除1.txt 和dir1.tar外,打包tar 步骤一.建立e ...
- think in java 第四版读书笔记 第一章对象导论
很久没有碰过java了,为了项目需要以及以后找工作,还是有必要将think in java通读一遍.欢迎大家一起讨论学习 1.1抽象过程 面向对象语言的5个特性: 1.万物皆对象 任何事物都可以抽象为 ...
- [javascript|基本概念|Underfined]学习笔记
Underfined类型的值:underfined(只有一个) 1/声明未初始化 e.g.:var msg;-->msg == underfined:true 2/申明并值初始化为underfi ...
- 《JavaScript高级程序设计》心得笔记-----第三篇章
第十章 1. DOM1级定义了一个Node接口,以Node类型实现(除IE以外),为了确保跨浏览器兼容,最好用nodeType属性与数字数值进行比较(someNode. nodeType==1) ...
- java synchronized关键字浅探
synchronized 是 java 多线程编程中用于使线程之间的操作串行化的关键字.这种措施类似于数据库中使用排他锁实现并发控制,但是有所不同的是,数据库中是对数据对象加锁,而 java 则是对将 ...