@better-auth/electron 1.6.12 → 1.6.13

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/client.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-dnGn0OgM.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-BcVD6vO4.mjs";
2
2
  import { n as isProcessType, r as parseProtocolScheme, t as getChannelPrefixWithDelimiter } from "./utils-DxDKRT6e.mjs";
3
3
  import { BetterAuthError } from "@better-auth/core/error";
4
4
  import { base64, base64Url } from "@better-auth/utils/base64";
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-dnGn0OgM.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-BcVD6vO4.mjs";
2
2
  import { createAuthMiddleware } from "@better-auth/core/api";
3
3
  import { APIError, BASE_ERROR_CODES } from "@better-auth/core/error";
4
4
  import { base64Url } from "@better-auth/utils/base64";
@@ -4872,7 +4872,14 @@ interface InternalAdapter<_Options extends BetterAuthOptions = BetterAuthOptions
4872
4872
  * @param id - The account row's primary key (the `id` column, not the `accountId` column).
4873
4873
  */
4874
4874
  deleteAccount(id: string): Promise<void>;
4875
- deleteSessions(userIdOrSessionTokens: string | string[]): Promise<void>;
4875
+ /**
4876
+ * Delete every session belonging to a user.
4877
+ */
4878
+ deleteUserSessions(userId: string): Promise<void>;
4879
+ /**
4880
+ * Delete sessions by their session tokens.
4881
+ */
4882
+ deleteSessions(sessionTokens: string[]): Promise<void>;
4876
4883
  findOAuthUser(email: string, accountId: string, providerId: string): Promise<{
4877
4884
  user: User;
4878
4885
  linkedAccount: Account | null;
@@ -4890,7 +4897,6 @@ interface InternalAdapter<_Options extends BetterAuthOptions = BetterAuthOptions
4890
4897
  updateUserByEmail<T extends Record<string, any>>(email: string, data: Partial<User & Record<string, any>>): Promise<User & T>;
4891
4898
  updatePassword(userId: string, password: string): Promise<void>;
4892
4899
  findAccounts(userId: string): Promise<Account[]>;
4893
- findAccount(accountId: string): Promise<Account | null>;
4894
4900
  findAccountByProviderId(accountId: string, providerId: string): Promise<Account | null>;
4895
4901
  findAccountByUserId(userId: string): Promise<Account[]>;
4896
4902
  updateAccount(id: string, data: Partial<Account>): Promise<Account>;
@@ -4968,7 +4974,7 @@ type AuthContext<Options extends BetterAuthOptions = BetterAuthOptions> = Plugin
4968
4974
  * - "cookie": Store state in an encrypted cookie (stateless)
4969
4975
  * - "database": Store state in the database
4970
4976
  *
4971
- * @default "cookie"
4977
+ * @default "database" when `database` or `secondaryStorage` is configured, "cookie" otherwise
4972
4978
  */
4973
4979
  storeStateStrategy: "database" | "cookie";
4974
4980
  };
@@ -6292,7 +6298,11 @@ type BetterAuthOptions = {
6292
6298
  */
6293
6299
  allowUnlinkingAll?: boolean;
6294
6300
  /**
6295
- * If enabled (true), this will update the user information based on the newly linked account
6301
+ * When enabled, linking an account copies the provider's profile onto
6302
+ * the local user, matching the fields persisted on sign-up (`name`,
6303
+ * `image`, and any `mapProfileToUser` fields). The local `email` and
6304
+ * `emailVerified` are never changed, so a link cannot rebind the
6305
+ * account's identity.
6296
6306
  *
6297
6307
  * @default false
6298
6308
  */
@@ -6325,7 +6335,7 @@ type BetterAuthOptions = {
6325
6335
  * - "cookie": Store state in an encrypted cookie (stateless)
6326
6336
  * - "database": Store state in the database
6327
6337
  *
6328
- * @default "cookie"
6338
+ * @default "database" when `database` or `secondaryStorage` is configured, "cookie" otherwise
6329
6339
  */
6330
6340
  storeStateStrategy?: "database" | "cookie";
6331
6341
  /**
package/dist/proxy.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-dnGn0OgM.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-BcVD6vO4.mjs";
2
2
  import { r as parseProtocolScheme } from "./utils-DxDKRT6e.mjs";
3
3
  import { parseCookies } from "better-auth/cookies";
4
4
  //#region src/proxy.ts
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const PACKAGE_VERSION = "1.6.12";
3
+ const PACKAGE_VERSION = "1.6.13";
4
4
  //#endregion
5
5
  export { PACKAGE_VERSION as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/electron",
3
- "version": "1.6.12",
3
+ "version": "1.6.13",
4
4
  "description": "Better Auth integration for Electron applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -80,8 +80,8 @@
80
80
  "better-sqlite3": "^12.6.2",
81
81
  "electron": "^41.2.2",
82
82
  "tsdown": "0.21.1",
83
- "@better-auth/core": "1.6.12",
84
- "better-auth": "1.6.12"
83
+ "@better-auth/core": "1.6.13",
84
+ "better-auth": "1.6.13"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@better-auth/utils": "0.4.1",
@@ -89,8 +89,8 @@
89
89
  "better-call": "1.3.5",
90
90
  "conf": "^15.0.2",
91
91
  "electron": ">=36.0.0",
92
- "@better-auth/core": "^1.6.12",
93
- "better-auth": "^1.6.12"
92
+ "@better-auth/core": "^1.6.13",
93
+ "better-auth": "^1.6.13"
94
94
  },
95
95
  "peerDependenciesMeta": {
96
96
  "electron": {