@base44-preview/sdk 0.8.4-pr.49.dcd1786 → 0.8.4-pr.51.2ae034f

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.d.ts CHANGED
@@ -75,7 +75,6 @@ export declare function createClient(config: {
75
75
  me(): Promise<import("axios").AxiosResponse<any, any>>;
76
76
  updateMe(data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
77
77
  redirectToLogin(nextUrl: string): void;
78
- loginWithProvider(provider: string, fromUrl?: string): void;
79
78
  logout(redirectUrl?: string): void;
80
79
  setToken(token: string, saveToStorage?: boolean): void;
81
80
  loginViaEmailPassword(email: string, password: string, turnstileToken?: string): Promise<{
@@ -180,7 +179,6 @@ export declare function createClientFromRequest(request: Request): {
180
179
  me(): Promise<import("axios").AxiosResponse<any, any>>;
181
180
  updateMe(data: Record<string, any>): Promise<import("axios").AxiosResponse<any, any>>;
182
181
  redirectToLogin(nextUrl: string): void;
183
- loginWithProvider(provider: string, fromUrl?: string): void;
184
182
  logout(redirectUrl?: string): void;
185
183
  setToken(token: string, saveToStorage?: boolean): void;
186
184
  loginViaEmailPassword(email: string, password: string, turnstileToken?: string): Promise<{
@@ -27,13 +27,6 @@ export declare function createAuthModule(axios: AxiosInstance, functionsAxiosCli
27
27
  * @throws {Error} When not in a browser environment
28
28
  */
29
29
  redirectToLogin(nextUrl: string): void;
30
- /**
31
- * Redirects the user to a provider's login page
32
- * @param {string} provider - OAuth provider name (e.g., 'google', 'github')
33
- * @param {string} fromUrl - Optional URL to redirect to after successful login (defaults to '/')
34
- * @throws {Error} When not in a browser environment
35
- */
36
- loginWithProvider(provider: string, fromUrl?: string): void;
37
30
  /**
38
31
  * Logout the current user
39
32
  * Removes the token from localStorage and optionally redirects to a URL or reloads the page
@@ -42,21 +42,6 @@ export function createAuthModule(axios, functionsAxiosClient, appId, options) {
42
42
  // Redirect to the login page
43
43
  window.location.href = loginUrl;
44
44
  },
45
- /**
46
- * Redirects the user to a provider's login page
47
- * @param {string} provider - OAuth provider name (e.g., 'google', 'github')
48
- * @param {string} fromUrl - Optional URL to redirect to after successful login (defaults to '/')
49
- * @throws {Error} When not in a browser environment
50
- */
51
- loginWithProvider(provider, fromUrl = "/") {
52
- // Build the full redirect URL
53
- const redirectUrl = new URL(fromUrl, window.location.origin).toString();
54
- // Build the provider login URL (google is the default, so no provider path needed)
55
- const providerPath = provider === "google" ? "" : `/${provider}`;
56
- const loginUrl = `${options.serverUrl}/api/apps/auth${providerPath}/login?app_id=${appId}&from_url=${encodeURIComponent(redirectUrl)}`;
57
- // Redirect to the provider login page
58
- window.location.href = loginUrl;
59
- },
60
45
  /**
61
46
  * Logout the current user
62
47
  * Removes the token from localStorage and optionally redirects to a URL or reloads the page
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/sdk",
3
- "version": "0.8.4-pr.49.dcd1786",
3
+ "version": "0.8.4-pr.51.2ae034f",
4
4
  "description": "JavaScript SDK for Base44 API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",