@lovable.dev/cloud-auth-js 1.1.2 → 1.1.3-dev.17

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @lovable.dev/cloud-auth-js
2
2
 
3
- OAuth authentication library for Lovable projects using Supabase.
3
+ Legacy OAuth broker library for Lovable projects.
4
4
 
5
5
  ## Installation
6
6
 
@@ -43,7 +43,7 @@ Creates a Lovable auth instance.
43
43
  | Option | Type | Default | Description |
44
44
  | ----------------------- | ---------- | ------------------------------- | ------------------------------------- |
45
45
  | `oauthBrokerUrl` | `string` | `"/~oauth/initiate"` | OAuth broker initiate URL |
46
- | `supportedOAuthOrigins` | `string[]` | `["https://oauth.lovable.app"]` | Allowed origins for OAuth postMessage |
46
+ | `supportedOAuthOrigins` | `string[]` | `["https://oauth.lovable.app", "https://lovable.dev"]` | Allowed origins for OAuth postMessage |
47
47
 
48
48
  ### `signInWithOAuth(provider, options?)`
49
49
 
@@ -53,7 +53,7 @@ Initiates OAuth sign-in flow.
53
53
 
54
54
  | Parameter | Type | Description |
55
55
  | ---------------------- | ------------------------ | ---------------------------------------------------------- |
56
- | `provider` | `"google" \| "apple"` | OAuth provider |
56
+ | `provider` | `"google" \| "apple" \| "microsoft" \| "lovable"` | OAuth provider |
57
57
  | `options.redirect_uri` | `string` | Custom redirect URI (defaults to `window.location.origin`) |
58
58
  | `options.extraParams` | `Record<string, string>` | Additional params to send to the OAuth broker |
59
59
 
package/dist/index.cjs CHANGED
@@ -24,42 +24,6 @@ __export(src_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(src_exports);
26
26
 
27
- // package.json
28
- var package_default = {
29
- name: "@lovable.dev/cloud-auth-js",
30
- version: "1.1.2",
31
- description: "Lovable Cloud Auth JS",
32
- main: "./dist/index.cjs",
33
- module: "./dist/index.js",
34
- types: "./dist/index.d.ts",
35
- type: "module",
36
- files: [
37
- "dist"
38
- ],
39
- scripts: {
40
- build: "tsup src/index.ts --format cjs,esm --dts --outDir dist",
41
- dev: "tsup src/index.ts --format cjs,esm --dts --watch",
42
- test: "vitest run",
43
- typecheck: "tsgo --noEmit",
44
- prepublishOnly: "npm run clean && npm run build",
45
- clean: "rimraf dist"
46
- },
47
- keywords: [
48
- "lovable",
49
- "oauth",
50
- "authentication"
51
- ],
52
- license: "MIT",
53
- devDependencies: {
54
- "@types/node": "^22",
55
- jsdom: "^26",
56
- rimraf: "^5.0.0",
57
- tsup: "^7.2.0",
58
- typescript: "^5",
59
- vitest: "^4.1.0"
60
- }
61
- };
62
-
63
27
  // src/auth.ts
64
28
  var EXPECTED_MESSAGE_TYPE = "authorization_response";
65
29
  var DEFAULT_OAUTH_BROKER_URL = "/~oauth/initiate";
@@ -231,9 +195,6 @@ function createAuth(config = {}) {
231
195
  }
232
196
 
233
197
  // src/index.ts
234
- if (typeof window !== "undefined") {
235
- window.__lovable_cloud_auth_js_version = package_default.version;
236
- }
237
198
  function createLovableAuth(config = {}) {
238
199
  return createAuth(config);
239
200
  }
package/dist/index.d.cts CHANGED
@@ -30,4 +30,4 @@ interface LovableAuth {
30
30
 
31
31
  declare function createLovableAuth(config?: LovableAuthConfig): LovableAuth;
32
32
 
33
- export { LovableAuth, LovableAuthConfig, OAuthProvider, OAuthTokens, SignInWithOAuthOptions, SignInWithOAuthResult, createLovableAuth };
33
+ export { type LovableAuth, type LovableAuthConfig, type OAuthProvider, type OAuthTokens, type SignInWithOAuthOptions, type SignInWithOAuthResult, createLovableAuth };
package/dist/index.d.ts CHANGED
@@ -30,4 +30,4 @@ interface LovableAuth {
30
30
 
31
31
  declare function createLovableAuth(config?: LovableAuthConfig): LovableAuth;
32
32
 
33
- export { LovableAuth, LovableAuthConfig, OAuthProvider, OAuthTokens, SignInWithOAuthOptions, SignInWithOAuthResult, createLovableAuth };
33
+ export { type LovableAuth, type LovableAuthConfig, type OAuthProvider, type OAuthTokens, type SignInWithOAuthOptions, type SignInWithOAuthResult, createLovableAuth };
package/dist/index.js CHANGED
@@ -1,39 +1,3 @@
1
- // package.json
2
- var package_default = {
3
- name: "@lovable.dev/cloud-auth-js",
4
- version: "1.1.2",
5
- description: "Lovable Cloud Auth JS",
6
- main: "./dist/index.cjs",
7
- module: "./dist/index.js",
8
- types: "./dist/index.d.ts",
9
- type: "module",
10
- files: [
11
- "dist"
12
- ],
13
- scripts: {
14
- build: "tsup src/index.ts --format cjs,esm --dts --outDir dist",
15
- dev: "tsup src/index.ts --format cjs,esm --dts --watch",
16
- test: "vitest run",
17
- typecheck: "tsgo --noEmit",
18
- prepublishOnly: "npm run clean && npm run build",
19
- clean: "rimraf dist"
20
- },
21
- keywords: [
22
- "lovable",
23
- "oauth",
24
- "authentication"
25
- ],
26
- license: "MIT",
27
- devDependencies: {
28
- "@types/node": "^22",
29
- jsdom: "^26",
30
- rimraf: "^5.0.0",
31
- tsup: "^7.2.0",
32
- typescript: "^5",
33
- vitest: "^4.1.0"
34
- }
35
- };
36
-
37
1
  // src/auth.ts
38
2
  var EXPECTED_MESSAGE_TYPE = "authorization_response";
39
3
  var DEFAULT_OAUTH_BROKER_URL = "/~oauth/initiate";
@@ -205,9 +169,6 @@ function createAuth(config = {}) {
205
169
  }
206
170
 
207
171
  // src/index.ts
208
- if (typeof window !== "undefined") {
209
- window.__lovable_cloud_auth_js_version = package_default.version;
210
- }
211
172
  function createLovableAuth(config = {}) {
212
173
  return createAuth(config);
213
174
  }
package/package.json CHANGED
@@ -1,10 +1,17 @@
1
1
  {
2
2
  "name": "@lovable.dev/cloud-auth-js",
3
- "version": "1.1.2",
4
- "description": "Lovable Cloud Auth JS",
3
+ "version": "1.1.3-dev.17",
4
+ "description": "Lovable legacy OAuth broker JS",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ }
14
+ },
8
15
  "type": "module",
9
16
  "files": [
10
17
  "dist"
@@ -20,11 +27,11 @@
20
27
  "keywords": [
21
28
  "lovable",
22
29
  "oauth",
30
+ "broker",
23
31
  "authentication"
24
32
  ],
25
33
  "license": "MIT",
26
34
  "devDependencies": {
27
- "@types/node": "^22",
28
35
  "jsdom": "^26",
29
36
  "rimraf": "^5.0.0",
30
37
  "tsup": "^7.2.0",