@asgardeo/nuxt 0.1.0 → 0.1.2
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/module.d.mts +19 -3
- package/dist/module.json +1 -1
- package/dist/runtime/plugins/asgardeo.d.ts +0 -1
- package/dist/runtime/plugins/asgardeo.js +0 -1
- package/dist/runtime/server/plugins/asgardeo-ssr.d.ts +0 -1
- package/dist/runtime/server/plugins/asgardeo-ssr.js +0 -1
- package/package.json +3 -3
- package/dist/runtime/types/augments.d.ts +0 -61
package/dist/module.d.mts
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import * as __runtime_types from '../dist/runtime/types.js';
|
|
2
|
-
import { AsgardeoNuxtConfig } from '../dist/runtime/types.js';
|
|
3
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
import { AsgardeoNuxtConfig, AsgardeoSessionPayload, AsgardeoSSRData } from '../dist/runtime/types.js';
|
|
4
3
|
|
|
5
4
|
declare const _default: _nuxt_schema.NuxtModule<AsgardeoNuxtConfig, AsgardeoNuxtConfig, false>;
|
|
6
5
|
|
|
7
6
|
declare module '@nuxt/schema' {
|
|
7
|
+
interface NuxtConfig {
|
|
8
|
+
asgardeo?: AsgardeoNuxtConfig;
|
|
9
|
+
}
|
|
10
|
+
interface NuxtOptions {
|
|
11
|
+
asgardeo?: AsgardeoNuxtConfig;
|
|
12
|
+
}
|
|
8
13
|
interface PublicRuntimeConfig {
|
|
9
14
|
asgardeo: {
|
|
10
15
|
afterSignInUrl: string;
|
|
@@ -12,7 +17,7 @@ declare module '@nuxt/schema' {
|
|
|
12
17
|
applicationId?: string;
|
|
13
18
|
baseUrl: string;
|
|
14
19
|
clientId: string;
|
|
15
|
-
preferences?:
|
|
20
|
+
preferences?: AsgardeoNuxtConfig['preferences'];
|
|
16
21
|
scopes: string[];
|
|
17
22
|
signInUrl?: string;
|
|
18
23
|
signUpUrl?: string;
|
|
@@ -25,5 +30,16 @@ declare module '@nuxt/schema' {
|
|
|
25
30
|
};
|
|
26
31
|
}
|
|
27
32
|
}
|
|
33
|
+
declare module 'h3' {
|
|
34
|
+
interface H3EventContext {
|
|
35
|
+
asgardeo?: {
|
|
36
|
+
isSignedIn?: boolean;
|
|
37
|
+
session?: AsgardeoSessionPayload | {
|
|
38
|
+
sub?: string;
|
|
39
|
+
} | null;
|
|
40
|
+
ssr?: AsgardeoSSRData;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
28
44
|
|
|
29
45
|
export { _default as default };
|
package/dist/module.json
CHANGED
|
@@ -3,7 +3,6 @@ import { AsgardeoPlugin, ASGARDEO_KEY } from "@asgardeo/vue";
|
|
|
3
3
|
import { computed } from "vue";
|
|
4
4
|
import AsgardeoRoot from "../components/AsgardeoRoot.js";
|
|
5
5
|
import { defineNuxtPlugin, useState, useRequestEvent, useRuntimeConfig, navigateTo } from "#app";
|
|
6
|
-
import "../types/augments.d";
|
|
7
6
|
export default defineNuxtPlugin((nuxtApp) => {
|
|
8
7
|
const publicConfig = useRuntimeConfig().public.asgardeo;
|
|
9
8
|
if (import.meta.client && import.meta.dev) {
|
|
@@ -4,7 +4,6 @@ import { createLogger } from "../../utils/log.js";
|
|
|
4
4
|
import AsgardeoNuxtClient from "../AsgardeoNuxtClient.js";
|
|
5
5
|
import { verifyAndRehydrateSession } from "../utils/serverSession.js";
|
|
6
6
|
import { useRuntimeConfig } from "#imports";
|
|
7
|
-
import "../../types/augments.d";
|
|
8
7
|
const log = createLogger("asgardeo-ssr");
|
|
9
8
|
const CALLBACK_PATH = "/api/auth/callback";
|
|
10
9
|
function resolveCallbackUrl(event) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asgardeo/nuxt",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Nuxt module for Asgardeo - Authentication and Identity Management",
|
|
5
5
|
"author": "WSO2",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"@nuxt/kit": "3.16.2",
|
|
71
71
|
"defu": "6.1.4",
|
|
72
72
|
"jose": "^6.0.11",
|
|
73
|
-
"@asgardeo/browser": "0.7.
|
|
73
|
+
"@asgardeo/browser": "0.7.2",
|
|
74
74
|
"@asgardeo/node": "0.0.76",
|
|
75
|
-
"@asgardeo/vue": "0.3.
|
|
75
|
+
"@asgardeo/vue": "0.3.5"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"nuxt": ">=3.10.0",
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import type {AsgardeoSessionPayload, AsgardeoSSRData} from './types';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Nuxt schema augmentation — adds `asgardeo` to NuxtConfig / NuxtOptions
|
|
23
|
-
* and ensures the runtime config shapes are fully typed.
|
|
24
|
-
*/
|
|
25
|
-
declare module '@nuxt/schema' {
|
|
26
|
-
interface NuxtConfig {
|
|
27
|
-
asgardeo?: import('./types').AsgardeoNuxtConfig;
|
|
28
|
-
}
|
|
29
|
-
interface NuxtOptions {
|
|
30
|
-
asgardeo?: import('./types').AsgardeoNuxtConfig;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* H3 event context augmentation — provides a typed `event.context.asgardeo`
|
|
36
|
-
* property so server plugins and API routes no longer need `as any` casts.
|
|
37
|
-
*
|
|
38
|
-
* Set by the Nitro `asgardeo-ssr` plugin on every page request.
|
|
39
|
-
*/
|
|
40
|
-
declare module 'h3' {
|
|
41
|
-
interface H3EventContext {
|
|
42
|
-
/**
|
|
43
|
-
* Resolved auth state for the current request.
|
|
44
|
-
* Populated by the Nitro `asgardeo-ssr` plugin during SSR page requests.
|
|
45
|
-
* `null` when the request is an API route or when the session is absent/invalid.
|
|
46
|
-
*/
|
|
47
|
-
asgardeo?: {
|
|
48
|
-
isSignedIn: boolean;
|
|
49
|
-
session: AsgardeoSessionPayload | null;
|
|
50
|
-
/**
|
|
51
|
-
* Rich SSR payload populated by the Nitro `asgardeo-ssr` plugin.
|
|
52
|
-
* Contains the user, userProfile, organisations, and branding data
|
|
53
|
-
* resolved on the server and seeded into `useState` keys for
|
|
54
|
-
* zero-cost client hydration.
|
|
55
|
-
*/
|
|
56
|
-
ssr?: AsgardeoSSRData;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export {};
|