Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 727 Bytes

account.md

File metadata and controls

19 lines (11 loc) · 727 Bytes

Utilities related to user account

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:

logout()

Logs out currently logged in user. It ensures that changes are saved to config file.

refreshToken(sdk)

Conditionally refreshes idToken for currently logged in user if needed. If idToken did not expire yet, it won't be refreshed.