谷歌Calendar api v3仅限首次身份验证 [英] google Calendar api v3 Auth only for first time

查看:86
本文介绍了谷歌Calendar api v3仅限首次身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用通过使用Google+和Facebook进行了社交媒体身份验证. 应用程序使用Google日历.从应用程序中,用户可以添加,编辑,删除事件. 因此,当用户使用google +登录时没有问题,但是当用户使用facebook登录时,用户需要使用google +登录进行日历交互,但是我希望用户一次(即第一次)进行google +身份验证.下一次用户登录时使用facebook,他不需要登录Google+即可添加,编辑,删除日历.我该如何实施?

My application have social media authentication by using google+ and facebook. application use google calendar. From application user can add, edit, delete the events. So when user login with google+ there is no problem But when user login with facebook the user need to login with google+ for calendar interaction but i want user to be authenticated for google+ only at once i.e for the first time.Next time when user logs in with facebook he should not need to login with google+ for add,edit, delete calendar. How can I implement this?

推荐答案

您应该安全地存储在用户首次授予对您的应用的访问权限时所获得的刷新令牌.之后,如果以前的Oauth令牌已过期,则可以随时使用此刷新令牌来获取新令牌.

You should safely store the refresh token that you get when the user first grants access to your app. Afterwards you can use this refresh tokens to obtain new tokens any time if the previous Oauth tokens have expired.

https://developers.google.com/accounts/docs/OAuth2

这篇关于谷歌Calendar api v3仅限首次身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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