@protobase/client 0.40.8 → 0.40.9

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.
Files changed (2) hide show
  1. package/dist/auth.js +2 -2
  2. package/package.json +3 -3
package/dist/auth.js CHANGED
@@ -8,7 +8,7 @@ import { usersClient } from "./users.js";
8
8
  import { signInFlows } from "./sign-in-flows.js";
9
9
  import { signInPolicyClient } from "./sign-in-policy.js";
10
10
  import { staffSignInClient } from "./staff-sign-in.js";
11
- import { isLocale } from "@protobase/schema/internal";
11
+ import { authBasePath, isLocale } from "@protobase/schema/internal";
12
12
  //#region src/auth.ts
13
13
  /** The expiry of a JWT in milliseconds, read from its payload (the signature is the server's business). */
14
14
  const tokenExpiry = (token) => {
@@ -27,7 +27,7 @@ const tokenExpiry = (token) => {
27
27
  */
28
28
  const createAuthSession = (options = {}) => {
29
29
  const origin = options.origin ?? globalThis.location?.origin ?? "http://localhost";
30
- const basePath = options.basePath ?? "/api/auth";
30
+ const basePath = options.basePath ?? authBasePath;
31
31
  const margin = options.refreshMarginMs ?? 6e4;
32
32
  const doFetch = options.fetch ?? ((input, init) => fetch(input, init));
33
33
  const client = betterAuthClient(origin, basePath, doFetch);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/client",
3
- "version": "0.40.8",
3
+ "version": "0.40.9",
4
4
  "description": "Typed fetch client for the Protobase REST API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -30,8 +30,8 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@better-auth/passkey": "^1.7.12",
33
- "@protobase/layout": "0.40.8",
34
- "@protobase/schema": "0.40.8",
33
+ "@protobase/layout": "0.40.9",
34
+ "@protobase/schema": "0.40.9",
35
35
  "@simplewebauthn/browser": "^13.3.0",
36
36
  "better-auth": "^1.7.12"
37
37
  }