@checkstack/auth-backend 0.0.2 → 0.0.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @checkstack/auth-backend
2
2
 
3
+ ## 0.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - f5b1f49: Improved BASE_URL handling with fallback defaults for local development.
8
+ - Updated dependencies [f5b1f49]
9
+ - Updated dependencies [f5b1f49]
10
+ - Updated dependencies [f5b1f49]
11
+ - @checkstack/backend-api@0.1.0
12
+ - @checkstack/common@0.0.3
13
+ - @checkstack/command-backend@0.0.3
14
+ - @checkstack/auth-common@0.0.3
15
+ - @checkstack/notification-common@0.0.3
16
+
3
17
  ## 0.0.2
4
18
 
5
19
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@checkstack/auth-backend",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -547,7 +547,7 @@ export default createBackendPlugin({
547
547
  // Using void to prevent timing attacks revealing email existence
548
548
  const notificationClient = rpcClient.forPlugin(NotificationApi);
549
549
  const frontendUrl =
550
- process.env.VITE_FRONTEND_URL || "http://localhost:5173";
550
+ process.env.BASE_URL || "http://localhost:5173";
551
551
  const resetUrl = `${frontendUrl}/auth/reset-password?token=${
552
552
  url.split("token=")[1] ?? ""
553
553
  }`;
@@ -572,10 +572,8 @@ export default createBackendPlugin({
572
572
  },
573
573
  socialProviders,
574
574
  basePath: "/api/auth",
575
- baseURL: process.env.VITE_API_BASE_URL || "http://localhost:3000",
576
- trustedOrigins: [
577
- process.env.VITE_FRONTEND_URL || "http://localhost:5173",
578
- ],
575
+ baseURL: process.env.BASE_URL || "http://localhost:5173",
576
+ trustedOrigins: [process.env.BASE_URL || "http://localhost:5173"],
579
577
  databaseHooks: {
580
578
  user: {
581
579
  create: {
@@ -15,15 +15,14 @@ export function encodeAuthError(message: string): string {
15
15
  /**
16
16
  * Build auth error redirect URL
17
17
  * @param errorMessage - User-friendly error message
18
- * @param frontendUrl - Frontend base URL (defaults to VITE_FRONTEND_URL env var)
18
+ * @param frontendUrl - Frontend base URL (defaults to BASE_URL env var)
19
19
  * @returns The full redirect URL to the error page
20
20
  */
21
21
  export function buildAuthErrorUrl(
22
22
  errorMessage: string,
23
23
  frontendUrl?: string
24
24
  ): string {
25
- const base =
26
- frontendUrl || process.env.VITE_FRONTEND_URL || "http://localhost:5173";
25
+ const base = frontendUrl || process.env.BASE_URL;
27
26
  const encoded = encodeAuthError(errorMessage);
28
27
  return `${base}/auth/error?error=${encodeURIComponent(encoded)}`;
29
28
  }