@tidecloak/js 0.9.12 → 0.9.13
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 +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ IAMService
|
|
|
95
95
|
|
|
96
96
|
(async () => {
|
|
97
97
|
try {
|
|
98
|
-
await IAMService.initIAM(config); // You can add
|
|
98
|
+
await IAMService.initIAM(config); // You can add redirectUri here if customizing
|
|
99
99
|
} catch (err) {
|
|
100
100
|
console.error("Failed to initialize IAM:", err);
|
|
101
101
|
statusEl.textContent = "❌ Initialization error";
|
|
@@ -126,12 +126,12 @@ If not explicitly set, the default value is:
|
|
|
126
126
|
> This means your app **must contain a static file or route** at `/auth/redirect`.
|
|
127
127
|
> In Vite, this typically means adding a file like `public/auth/redirect.html`.
|
|
128
128
|
|
|
129
|
-
You can override this behavior by passing a `
|
|
129
|
+
You can override this behavior by passing a `redirectUri` to `initIAM()`:
|
|
130
130
|
|
|
131
131
|
```js
|
|
132
132
|
await IAMService.initIAM({
|
|
133
133
|
...config,
|
|
134
|
-
|
|
134
|
+
redirectUri: "https://yourdomain.com/auth/callback"
|
|
135
135
|
});
|
|
136
136
|
```
|
|
137
137
|
|
|
@@ -157,7 +157,7 @@ await IAMService.initIAM({
|
|
|
157
157
|
|
|
158
158
|
**Description:** This file ensures that the default redirect URI resolves without a 404.
|
|
159
159
|
|
|
160
|
-
If you override the `
|
|
160
|
+
If you override the `redirectUri` in `initIAM`, make sure to **update the corresponding redirect path** and that it exists in `public/` or your router.
|
|
161
161
|
|
|
162
162
|
---
|
|
163
163
|
|
|
@@ -300,6 +300,6 @@ await IAMService.doDecrypt([{ encrypted: "...", tags: ["tag1"] }]);
|
|
|
300
300
|
* **Error Handling**: Listen to `initError` and `authError` to gracefully recover.
|
|
301
301
|
* **Silent Refresh**: Built-in; you only need to call `updateIAMToken` if you want manual control.
|
|
302
302
|
* **Event Cleanup**: Use `.off(...)` in SPAs before component unmount.
|
|
303
|
-
* **Redirect URI**: If using a custom `
|
|
303
|
+
* **Redirect URI**: If using a custom `redirectUri`, ensure the route or file exists.
|
|
304
304
|
|
|
305
305
|
---
|