该应用程序不断请求“具有离线访问"的权限,为什么? [英] The App keeps asking for permission to "Have offline access", why?

查看:15
本文介绍了该应用程序不断请求“具有离线访问"的权限,为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用 oAuth2 授权应用程序并获取所请求范围的权限后,每次尝试使用 Google oAuth2 登录时,我仍然会看到一个屏幕,询问我是否授予应用程序离线访问的权限.不是不应该再出现的东西,一旦我允许它拥有它吗?

After having authorized the app with oAuth2 and acquiring permissions for requested scopes, I still get a screen asking if I grant the app permission to Have offline access, each time I try to login with Google oAuth2. Isn't it something that shouldn't appear again, once I grant it permission to have it?

推荐答案

您是否使用了 approval_prompt 参数?如果您已经拥有刷新令牌,请尽量不要再次请求离线访问.即使用户再次登录,它也应该保持有效,无需请求离线访问.

Do you use the approval_prompt parameter? Try not to ask for offline access again if you already have an refresh token. It should stay valid even if the user logs in again, without requesting offline access.

可以在此处找到关于此的参考.

A reference about this can be found here.

这篇关于该应用程序不断请求“具有离线访问"的权限,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆