@insforge/sdk 1.3.0-ssr.3 → 1.3.1
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/CONTRIBUTING.md +27 -0
- package/README.md +5 -2
- package/SDK-REFERENCE.md +842 -0
- package/dist/{client-CQfw9UsO.d.mts → client-DTNmGqHB.d.mts} +20 -5
- package/dist/{client-CQfw9UsO.d.ts → client-DTNmGqHB.d.ts} +20 -5
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +36 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -13
- package/dist/index.mjs.map +1 -1
- package/dist/ssr.d.mts +1 -1
- package/dist/ssr.d.ts +1 -1
- package/dist/ssr.js +46 -15
- package/dist/ssr.js.map +1 -1
- package/dist/ssr.mjs +46 -15
- package/dist/ssr.mjs.map +1 -1
- package/package.json +5 -3
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Contributing to InsForge SDK
|
|
2
|
+
|
|
3
|
+
Thanks for helping improve the InsForge JavaScript SDK.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
1. Fork and clone this repository.
|
|
8
|
+
2. Install dependencies:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
3. Run the relevant checks before opening a pull request:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm run typecheck
|
|
18
|
+
npm run lint
|
|
19
|
+
npm run test:run
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Pull Requests
|
|
23
|
+
|
|
24
|
+
- Keep changes focused and describe the user-facing impact.
|
|
25
|
+
- Add or update tests when changing SDK behavior.
|
|
26
|
+
- Update `README.md` or `SDK-REFERENCE.md` when changing public APIs.
|
|
27
|
+
- Link related issues in the pull request description.
|
package/README.md
CHANGED
|
@@ -74,10 +74,13 @@ const { data, error } = await insforge.auth.signInWithPassword({
|
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
// OAuth authentication (built-in or custom provider key)
|
|
77
|
-
await insforge.auth.signInWithOAuth({
|
|
78
|
-
provider: "google", // e.g. built-in: "google", custom: "auth0-acme"
|
|
77
|
+
await insforge.auth.signInWithOAuth("google", {
|
|
79
78
|
redirectTo: "http://localhost:3000/dashboard",
|
|
79
|
+
additionalParams: { prompt: "select_account" },
|
|
80
80
|
});
|
|
81
|
+
// additionalParams is for provider-specific hints only.
|
|
82
|
+
// Do not pass client_id, scope, redirect_uri, code_challenge, state, or response_type;
|
|
83
|
+
// InsForge sets server-owned OAuth fields and ignores colliding client-provided keys.
|
|
81
84
|
|
|
82
85
|
// Get current user (call this during browser app startup)
|
|
83
86
|
const { data: currentUser } = await insforge.auth.getCurrentUser();
|