balena-sdk 21.2.1 → 21.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es2017/auth.js CHANGED
@@ -61,7 +61,7 @@ const getAuth = function (deps, opts) {
61
61
  });
62
62
  const getActorDetails = async (noCache = false) => {
63
63
  if (noCache) {
64
- await memoizedActorWhoami.clear();
64
+ memoizedActorWhoami.clear();
65
65
  }
66
66
  try {
67
67
  return await memoizedActorWhoami();
@@ -170,7 +170,7 @@ const getAuth = function (deps, opts) {
170
170
  * balena.auth.login(credentials);
171
171
  */
172
172
  async function login(credentials) {
173
- await memoizedActorWhoami.clear();
173
+ memoizedActorWhoami.clear();
174
174
  const token = await authenticate(credentials);
175
175
  await auth.setKey(token);
176
176
  }
@@ -190,7 +190,7 @@ const getAuth = function (deps, opts) {
190
190
  * balena.auth.loginWithToken(authToken);
191
191
  */
192
192
  async function loginWithToken(authToken) {
193
- await memoizedActorWhoami.clear();
193
+ memoizedActorWhoami.clear();
194
194
  return auth.setKey(authToken);
195
195
  }
196
196
  /**
@@ -309,7 +309,7 @@ const getAuth = function (deps, opts) {
309
309
  * balena.auth.logout();
310
310
  */
311
311
  async function logout() {
312
- await memoizedActorWhoami.clear();
312
+ memoizedActorWhoami.clear();
313
313
  return auth.removeKey();
314
314
  }
315
315
  /**