google Calendar api v3 Auth only for first time

2019-09-03 07:34发布

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条回答
姐就是有狂的资本
2楼-- · 2019-09-03 08:09

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

查看更多
登录 后发表回答