@eaccess/auth 0.1.16 → 0.1.18

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/dist/index.js CHANGED
@@ -634,7 +634,7 @@ var BaseOAuthProvider = class {
634
634
  if (existingProvider) {
635
635
  const account2 = await queries.findAccountById(existingProvider.account_id);
636
636
  if (account2) {
637
- await this.authManager.onLoginSuccessful(account2, false);
637
+ await this.authManager.onLoginSuccessful(account2, true);
638
638
  return { isNewUser: false };
639
639
  }
640
640
  }
@@ -669,7 +669,7 @@ var BaseOAuthProvider = class {
669
669
  providerName: userData.name || null,
670
670
  providerAvatar: userData.avatar || null
671
671
  });
672
- await this.authManager.onLoginSuccessful(account, false);
672
+ await this.authManager.onLoginSuccessful(account, true);
673
673
  return { isNewUser: true };
674
674
  }
675
675
  async exchangeCodeForToken(code, tokenUrl) {
@@ -1771,7 +1771,7 @@ var AuthManager = class {
1771
1771
  this.setRememberCookie(null, /* @__PURE__ */ new Date(0));
1772
1772
  return;
1773
1773
  }
1774
- await this.onLoginSuccessful(account, true);
1774
+ await this.onLoginSuccessful(account, false);
1775
1775
  }
1776
1776
  async onLoginSuccessful(account, remember = false) {
1777
1777
  await this.queries.updateAccountLastLogin(account.id);