google Calendar api v3 Auth only for first time

落爺英雄遲暮 提交于 2019-12-12 02:13:46

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/23759906/google-calendar-api-v3-auth-only-for-first-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!