@asgardeo/vue 0.3.3 → 0.3.5

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.
@@ -16,6 +16,31 @@
16
16
  * under the License.
17
17
  */
18
18
  import type { Plugin } from 'vue';
19
+ /**
20
+ * Options accepted by {@link AsgardeoPlugin}.
21
+ *
22
+ * @example Browser SPA (default behaviour — no options needed)
23
+ * ```ts
24
+ * app.use(AsgardeoPlugin);
25
+ * ```
26
+ *
27
+ * @example Delegated mode (e.g. @asgardeo/nuxt)
28
+ * ```ts
29
+ * // The host framework is responsible for providing all injection context
30
+ * // via app.provide(). The plugin skips browser-only initialisation so it
31
+ * // can run safely in SSR environments.
32
+ * app.use(AsgardeoPlugin, { mode: 'delegated' });
33
+ * ```
34
+ */
35
+ export interface AsgardeoPluginOptions {
36
+ /**
37
+ * `'browser'` (default) — full browser PKCE flow, registers `<AsgardeoProvider>`.
38
+ * `'delegated'` — the host framework (e.g. `@asgardeo/nuxt`) provides all
39
+ * injection context via `app.provide()`. The plugin skips browser-only
40
+ * initialisation so it is safe to call during SSR.
41
+ */
42
+ mode?: 'browser' | 'delegated';
43
+ }
19
44
  /**
20
45
  * Vue plugin for Asgardeo authentication.
21
46
  *
@@ -42,5 +67,5 @@ import type { Plugin } from 'vue';
42
67
  * </template>
43
68
  * ```
44
69
  */
45
- declare const AsgardeoPlugin: Plugin;
70
+ declare const AsgardeoPlugin: Plugin<[AsgardeoPluginOptions?]>;
46
71
  export default AsgardeoPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgardeo/vue",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Vue 3 SDK for Asgardeo - Authentication and Identity Management",
5
5
  "keywords": [
6
6
  "asgardeo",
@@ -64,7 +64,7 @@
64
64
  "dependencies": {
65
65
  "dompurify": "3.3.1",
66
66
  "tslib": "2.8.1",
67
- "@asgardeo/browser": "0.7.0",
67
+ "@asgardeo/browser": "0.7.2",
68
68
  "@asgardeo/i18n": "0.4.5"
69
69
  },
70
70
  "publishConfig": {