Obtains valid authorization data.
This method performs the necessary steps in order to obtain a valid access token. It performs the OAuth dance prompting the user to log in, exchanges the obtained authorization code for an access and a refresh token, caches those, and returns both to the developer.
When it is invoked again, it will first check whether the cached access token is still valid (including a configurable safety margin) and the scopes equal, and return the token directly if that is the case. Otherwise, the method will transparently refresh the token (or obtain a new one if the scopes changed) and return that.
Bottom line - always call this if you need a valid access token in your code.
OAuth configuration
Removes all cached data so that authorize
performs the full
oauth dance again.
This is akin to a "logout".
Generated using TypeDoc
The local storage key where the auth data is cached.
The data is stored as stringified JSON object.