Note: Utilities aid old (to be deprecated and removed) authentication & authorization system
User account related utilities that also interact with stored config file. Several methods depend on sdk
parameter, which should be provided as an instance of ServerlessSDK
from @serverless/platform-client
library.
const accountUtils = require('@serverless/utils/account');
Exposes following async methods:
Logs out currently logged in user. It ensures that changes are saved to config file.
Conditionally refreshes idToken
for currently logged in user if needed. If idToken
did not expire yet, it won't be refreshed.