@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.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -723,7 +723,7 @@ var BaseOAuthProvider = class {
|
|
|
723
723
|
if (existingProvider) {
|
|
724
724
|
const account2 = await queries.findAccountById(existingProvider.account_id);
|
|
725
725
|
if (account2) {
|
|
726
|
-
await this.authManager.onLoginSuccessful(account2,
|
|
726
|
+
await this.authManager.onLoginSuccessful(account2, true);
|
|
727
727
|
return { isNewUser: false };
|
|
728
728
|
}
|
|
729
729
|
}
|
|
@@ -758,7 +758,7 @@ var BaseOAuthProvider = class {
|
|
|
758
758
|
providerName: userData.name || null,
|
|
759
759
|
providerAvatar: userData.avatar || null
|
|
760
760
|
});
|
|
761
|
-
await this.authManager.onLoginSuccessful(account,
|
|
761
|
+
await this.authManager.onLoginSuccessful(account, true);
|
|
762
762
|
return { isNewUser: true };
|
|
763
763
|
}
|
|
764
764
|
async exchangeCodeForToken(code, tokenUrl) {
|
|
@@ -1860,7 +1860,7 @@ var AuthManager = class {
|
|
|
1860
1860
|
this.setRememberCookie(null, /* @__PURE__ */ new Date(0));
|
|
1861
1861
|
return;
|
|
1862
1862
|
}
|
|
1863
|
-
await this.onLoginSuccessful(account,
|
|
1863
|
+
await this.onLoginSuccessful(account, false);
|
|
1864
1864
|
}
|
|
1865
1865
|
async onLoginSuccessful(account, remember = false) {
|
|
1866
1866
|
await this.queries.updateAccountLastLogin(account.id);
|