Chrome Extension remember user authentication

2019-05-31 23:38发布

问题:

I have built a Chrome Extension that simply pulls events from private calendar using Google API. I'm using launchWebAuthFlow to authenticate for the private Google Calendar due to multiple users/accounts under the private calendar.

User has to sign in only once when browser is open. So when the extension icon is clicked, or whenever a new tab is open, the calendar events will show on the page once the user has logged in. However, the user must sign back in when restarting the Chrome browser itself in order to authenticate and pull the calendar events on the extension.

Question: Is there a way to save user authentication so that user doesn't have to sign in every time he or she restarts the browser or the computer itself? In other words, is there a way to make it a one-time log in only to authenticate on Chrome Extension?

Thanks!!