nuxt-auth-utils 0.5.30 → 0.5.32
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.json +1 -1
- package/dist/runtime/server/api/session.delete.d.ts +1 -3
- package/dist/runtime/server/api/session.get.d.ts +1 -1
- package/dist/runtime/server/lib/atproto/bluesky.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/apple.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/apple.js +1 -1
- package/dist/runtime/server/lib/oauth/atlassian.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/atlassian.js +1 -1
- package/dist/runtime/server/lib/oauth/auth0.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/auth0.js +1 -1
- package/dist/runtime/server/lib/oauth/authentik.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/authentik.js +1 -1
- package/dist/runtime/server/lib/oauth/azureb2c.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/azureb2c.js +1 -1
- package/dist/runtime/server/lib/oauth/battledotnet.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/battledotnet.js +1 -1
- package/dist/runtime/server/lib/oauth/box.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/box.js +1 -1
- package/dist/runtime/server/lib/oauth/cognito.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/cognito.js +1 -1
- package/dist/runtime/server/lib/oauth/discord.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/discord.js +1 -1
- package/dist/runtime/server/lib/oauth/dropbox.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/dropbox.js +1 -1
- package/dist/runtime/server/lib/oauth/facebook.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/facebook.js +1 -1
- package/dist/runtime/server/lib/oauth/gitea.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/gitea.js +1 -1
- package/dist/runtime/server/lib/oauth/github.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/github.js +1 -1
- package/dist/runtime/server/lib/oauth/gitlab.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/gitlab.js +1 -1
- package/dist/runtime/server/lib/oauth/google.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/google.js +1 -1
- package/dist/runtime/server/lib/oauth/heroku.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/heroku.js +1 -1
- package/dist/runtime/server/lib/oauth/hubspot.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/hubspot.js +1 -1
- package/dist/runtime/server/lib/oauth/instagram.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/instagram.js +1 -1
- package/dist/runtime/server/lib/oauth/keycloak.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/keycloak.js +1 -1
- package/dist/runtime/server/lib/oauth/kick.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/kick.js +1 -1
- package/dist/runtime/server/lib/oauth/line.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/line.js +1 -1
- package/dist/runtime/server/lib/oauth/linear.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/linear.js +1 -1
- package/dist/runtime/server/lib/oauth/linkedin.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/linkedin.js +1 -1
- package/dist/runtime/server/lib/oauth/livechat.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/livechat.js +1 -1
- package/dist/runtime/server/lib/oauth/microsoft.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/microsoft.js +1 -1
- package/dist/runtime/server/lib/oauth/oidc.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/oidc.js +1 -1
- package/dist/runtime/server/lib/oauth/okta.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/okta.js +1 -1
- package/dist/runtime/server/lib/oauth/ory.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/ory.js +1 -1
- package/dist/runtime/server/lib/oauth/osu.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/osu.js +1 -1
- package/dist/runtime/server/lib/oauth/paypal.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/paypal.js +1 -1
- package/dist/runtime/server/lib/oauth/polar.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/polar.js +1 -1
- package/dist/runtime/server/lib/oauth/riotgames.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/riotgames.js +1 -1
- package/dist/runtime/server/lib/oauth/roblox.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/roblox.js +1 -1
- package/dist/runtime/server/lib/oauth/salesforce.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/salesforce.js +1 -1
- package/dist/runtime/server/lib/oauth/seznam.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/seznam.js +1 -1
- package/dist/runtime/server/lib/oauth/shopifyCustomer.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/shopifyCustomer.js +1 -1
- package/dist/runtime/server/lib/oauth/slack.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/slack.js +1 -1
- package/dist/runtime/server/lib/oauth/spotify.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/spotify.js +1 -1
- package/dist/runtime/server/lib/oauth/steam.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/steam.js +1 -1
- package/dist/runtime/server/lib/oauth/strava.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/strava.js +1 -1
- package/dist/runtime/server/lib/oauth/tiktok.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/tiktok.js +1 -1
- package/dist/runtime/server/lib/oauth/twitch.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/twitch.js +1 -1
- package/dist/runtime/server/lib/oauth/vk.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/vk.js +1 -1
- package/dist/runtime/server/lib/oauth/workos.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/workos.js +1 -1
- package/dist/runtime/server/lib/oauth/x.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/x.js +1 -1
- package/dist/runtime/server/lib/oauth/xsuaa.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/xsuaa.js +1 -1
- package/dist/runtime/server/lib/oauth/yandex.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/yandex.js +1 -1
- package/dist/runtime/server/lib/oauth/zitadel.d.ts +1 -1
- package/dist/runtime/server/lib/oauth/zitadel.js +1 -1
- package/dist/runtime/server/lib/utils.d.ts +3 -3
- package/dist/runtime/server/routes/atproto/client-metadata.json.get.d.ts +1 -128
- package/dist/runtime/server/utils/session.d.ts +5 -5
- package/dist/runtime/types/event.d.ts +4 -0
- package/dist/runtime/types/event.js +0 -0
- package/dist/runtime/types/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -33,7 +33,7 @@ export function defineOAuthRobloxEventHandler({ config, onSuccess, onError }) {
|
|
|
33
33
|
})
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
if (query.state !== state) {
|
|
36
|
+
if (!state || query.state !== state) {
|
|
37
37
|
return handleInvalidState(event, "roblox", onError);
|
|
38
38
|
}
|
|
39
39
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -43,4 +43,4 @@ export interface OAuthSalesforceConfig {
|
|
|
43
43
|
*/
|
|
44
44
|
redirectURL?: string;
|
|
45
45
|
}
|
|
46
|
-
export declare function defineOAuthSalesforceEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthSalesforceConfig>):
|
|
46
|
+
export declare function defineOAuthSalesforceEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthSalesforceConfig>): any;
|
|
@@ -45,7 +45,7 @@ export function defineOAuthSalesforceEventHandler({
|
|
|
45
45
|
})
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
|
-
if (query.state !== state) {
|
|
48
|
+
if (!state || query.state !== state) {
|
|
49
49
|
return handleInvalidState(event, "salesforce", onError);
|
|
50
50
|
}
|
|
51
51
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -95,4 +95,4 @@ export interface OAuthSeznamUser {
|
|
|
95
95
|
export declare function defineOAuthSeznamEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthSeznamConfig, {
|
|
96
96
|
user: OAuthSeznamUser;
|
|
97
97
|
tokens: unknown;
|
|
98
|
-
}>):
|
|
98
|
+
}>): any;
|
|
@@ -29,7 +29,7 @@ export function defineOAuthSeznamEventHandler({ config, onSuccess, onError }) {
|
|
|
29
29
|
})
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
|
-
if (query.state !== state) {
|
|
32
|
+
if (!state || query.state !== state) {
|
|
33
33
|
return handleInvalidState(event, "seznam", onError);
|
|
34
34
|
}
|
|
35
35
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -23,4 +23,4 @@ export interface OAuthShopifyCustomerConfig {
|
|
|
23
23
|
*/
|
|
24
24
|
redirectURL?: string;
|
|
25
25
|
}
|
|
26
|
-
export declare function defineOAuthShopifyCustomerEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthShopifyCustomerConfig>):
|
|
26
|
+
export declare function defineOAuthShopifyCustomerEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthShopifyCustomerConfig>): any;
|
|
@@ -42,7 +42,7 @@ export function defineOAuthShopifyCustomerEventHandler({
|
|
|
42
42
|
})
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
if (query.state !== state) {
|
|
45
|
+
if (!state || query.state !== state) {
|
|
46
46
|
return handleInvalidState(event, "shopifyCustomer", onError);
|
|
47
47
|
}
|
|
48
48
|
const tokens = await requestAccessToken(discoveryResponse.token_endpoint, {
|
|
@@ -38,4 +38,4 @@ export interface OAuthSlackConfig {
|
|
|
38
38
|
*/
|
|
39
39
|
redirectURL?: string;
|
|
40
40
|
}
|
|
41
|
-
export declare function defineOAuthSlackEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthSlackConfig>):
|
|
41
|
+
export declare function defineOAuthSlackEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthSlackConfig>): any;
|
|
@@ -44,4 +44,4 @@ export interface OAuthSpotifyConfig {
|
|
|
44
44
|
*/
|
|
45
45
|
redirectURL?: string;
|
|
46
46
|
}
|
|
47
|
-
export declare function defineOAuthSpotifyEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthSpotifyConfig>):
|
|
47
|
+
export declare function defineOAuthSpotifyEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthSpotifyConfig>): any;
|
|
@@ -33,7 +33,7 @@ export function defineOAuthSpotifyEventHandler({ config, onSuccess, onError }) {
|
|
|
33
33
|
})
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
if (query.state !== state) {
|
|
36
|
+
if (!state || query.state !== state) {
|
|
37
37
|
return handleInvalidState(event, "spotify", onError);
|
|
38
38
|
}
|
|
39
39
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -17,4 +17,4 @@ export interface OAuthSteamConfig {
|
|
|
17
17
|
*/
|
|
18
18
|
redirectURL?: string;
|
|
19
19
|
}
|
|
20
|
-
export declare function defineOAuthSteamEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthSteamConfig>):
|
|
20
|
+
export declare function defineOAuthSteamEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthSteamConfig>): any;
|
|
@@ -27,7 +27,7 @@ export function defineOAuthSteamEventHandler({ config, onSuccess, onError }) {
|
|
|
27
27
|
};
|
|
28
28
|
return sendRedirect(event, withQuery(config.authorizationURL, steamOpenIdParams));
|
|
29
29
|
}
|
|
30
|
-
if (query.state !== state) {
|
|
30
|
+
if (!state || query.state !== state) {
|
|
31
31
|
return handleInvalidState(event, "steam", onError);
|
|
32
32
|
}
|
|
33
33
|
if (!query["openid.signed"] || !query["openid.sig"]) {
|
|
@@ -116,4 +116,4 @@ export interface OAuthStravaTokens {
|
|
|
116
116
|
export declare function defineOAuthStravaEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthStravaConfig, {
|
|
117
117
|
user: OAuthStravaUser;
|
|
118
118
|
tokens: OAuthStravaTokens;
|
|
119
|
-
}>):
|
|
119
|
+
}>): any;
|
|
@@ -42,4 +42,4 @@ export interface OAuthTikTokConfig {
|
|
|
42
42
|
*/
|
|
43
43
|
redirectURL?: string;
|
|
44
44
|
}
|
|
45
|
-
export declare function defineOAuthTikTokEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthTikTokConfig>):
|
|
45
|
+
export declare function defineOAuthTikTokEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthTikTokConfig>): any;
|
|
@@ -39,7 +39,7 @@ export function defineOAuthTikTokEventHandler({ config, onSuccess, onError }) {
|
|
|
39
39
|
})
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
|
-
if (query.state !== state) {
|
|
42
|
+
if (!state || query.state !== state) {
|
|
43
43
|
return handleInvalidState(event, "tiktok", onError);
|
|
44
44
|
}
|
|
45
45
|
const tokens = await requestAccessToken(
|
|
@@ -67,5 +67,5 @@ interface TwitchTokens {
|
|
|
67
67
|
export declare function defineOAuthTwitchEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthTwitchConfig, {
|
|
68
68
|
user: TwitchUser;
|
|
69
69
|
tokens: TwitchTokens;
|
|
70
|
-
}>):
|
|
70
|
+
}>): any;
|
|
71
71
|
export {};
|
|
@@ -33,7 +33,7 @@ export function defineOAuthTwitchEventHandler({ config, onSuccess, onError }) {
|
|
|
33
33
|
})
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
if (query.state !== state) {
|
|
36
|
+
if (!state || query.state !== state) {
|
|
37
37
|
return handleInvalidState(event, "twitch", onError);
|
|
38
38
|
}
|
|
39
39
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -43,4 +43,4 @@ export interface OAuthVKConfig {
|
|
|
43
43
|
*/
|
|
44
44
|
redirectURL?: string;
|
|
45
45
|
}
|
|
46
|
-
export declare function defineOAuthVKEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthVKConfig>):
|
|
46
|
+
export declare function defineOAuthVKEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthVKConfig>): any;
|
|
@@ -63,4 +63,4 @@ export interface OAuthWorkOSTokens {
|
|
|
63
63
|
export declare function defineOAuthWorkOSEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthWorkOSConfig, {
|
|
64
64
|
user: OAuthWorkOSUser;
|
|
65
65
|
tokens: OAuthWorkOSTokens;
|
|
66
|
-
}>):
|
|
66
|
+
}>): any;
|
|
@@ -30,7 +30,7 @@ export function defineOAuthWorkOSEventHandler({ config, onSuccess, onError }) {
|
|
|
30
30
|
})
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
|
-
if (query.state !== state) {
|
|
33
|
+
if (!state || query.state !== state) {
|
|
34
34
|
return handleInvalidState(event, "workos", onError);
|
|
35
35
|
}
|
|
36
36
|
const authenticateResponse = await requestAccessToken("https://api.workos.com/user_management/authenticate", {
|
|
@@ -43,4 +43,4 @@ export interface OAuthXConfig {
|
|
|
43
43
|
*/
|
|
44
44
|
redirectURL?: string;
|
|
45
45
|
}
|
|
46
|
-
export declare function defineOAuthXEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthXConfig>):
|
|
46
|
+
export declare function defineOAuthXEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthXConfig>): any;
|
|
@@ -28,4 +28,4 @@ export interface OAuthXSUAAConfig {
|
|
|
28
28
|
*/
|
|
29
29
|
redirectURL?: string;
|
|
30
30
|
}
|
|
31
|
-
export declare function defineOAuthXSUAAEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthXSUAAConfig>):
|
|
31
|
+
export declare function defineOAuthXSUAAEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthXSUAAConfig>): any;
|
|
@@ -27,7 +27,7 @@ export function defineOAuthXSUAAEventHandler({ config, onSuccess, onError }) {
|
|
|
27
27
|
})
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
|
-
if (query.state !== state) {
|
|
30
|
+
if (!state || query.state !== state) {
|
|
31
31
|
return handleInvalidState(event, "xsuaa", onError);
|
|
32
32
|
}
|
|
33
33
|
const tokens = await requestAccessToken(tokenURL, {
|
|
@@ -43,4 +43,4 @@ export interface OAuthYandexConfig {
|
|
|
43
43
|
*/
|
|
44
44
|
redirectURL?: string;
|
|
45
45
|
}
|
|
46
|
-
export declare function defineOAuthYandexEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthYandexConfig>):
|
|
46
|
+
export declare function defineOAuthYandexEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthYandexConfig>): any;
|
|
@@ -48,7 +48,7 @@ export function defineOAuthYandexEventHandler({
|
|
|
48
48
|
})
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
-
if (query.state !== state) {
|
|
51
|
+
if (!state || query.state !== state) {
|
|
52
52
|
return handleInvalidState(event, "yandex", onError);
|
|
53
53
|
}
|
|
54
54
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -34,4 +34,4 @@ export interface OAuthZitadelConfig {
|
|
|
34
34
|
*/
|
|
35
35
|
redirectURL?: string;
|
|
36
36
|
}
|
|
37
|
-
export declare function defineOAuthZitadelEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthZitadelConfig>):
|
|
37
|
+
export declare function defineOAuthZitadelEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthZitadelConfig>): any;
|
|
@@ -66,7 +66,7 @@ export declare function handlePkceVerifier(event: H3Event): Promise<{
|
|
|
66
66
|
code_challenge: string;
|
|
67
67
|
code_challenge_method: string;
|
|
68
68
|
} | {
|
|
69
|
-
code_verifier:
|
|
69
|
+
code_verifier: any;
|
|
70
70
|
code_challenge?: undefined;
|
|
71
71
|
code_challenge_method?: undefined;
|
|
72
72
|
}>;
|
|
@@ -74,7 +74,7 @@ interface HandleStateOptions {
|
|
|
74
74
|
isCallback?: boolean;
|
|
75
75
|
sameSite?: 'lax' | 'none' | 'strict';
|
|
76
76
|
}
|
|
77
|
-
export declare function handleState(event: H3Event, options?: HandleStateOptions): Promise<
|
|
77
|
+
export declare function handleState(event: H3Event, options?: HandleStateOptions): Promise<any>;
|
|
78
78
|
export declare function parseJwt(token: string): jose.JWTPayload;
|
|
79
|
-
export declare function handleNonce(event: H3Event):
|
|
79
|
+
export declare function handleNonce(event: H3Event): any;
|
|
80
80
|
export {};
|
|
@@ -1,129 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
2
|
-
redirect_uris: [string, ...string[]];
|
|
3
|
-
scope?: string | undefined;
|
|
4
|
-
response_types?: ["code" | "none" | "token" | "code id_token token" | "code id_token" | "code token" | "id_token token" | "id_token", ...("code" | "none" | "token" | "code id_token token" | "code id_token" | "code token" | "id_token token" | "id_token")[]] | undefined;
|
|
5
|
-
grant_types?: ["authorization_code" | "implicit" | "refresh_token" | "password" | "client_credentials" | "urn:ietf:params:oauth:grant-type:jwt-bearer" | "urn:ietf:params:oauth:grant-type:saml2-bearer", ...("authorization_code" | "implicit" | "refresh_token" | "password" | "client_credentials" | "urn:ietf:params:oauth:grant-type:jwt-bearer" | "urn:ietf:params:oauth:grant-type:saml2-bearer")[]] | undefined;
|
|
6
|
-
token_endpoint_auth_method?: "client_secret_basic" | "client_secret_jwt" | "client_secret_post" | "none" | "private_key_jwt" | "self_signed_tls_client_auth" | "tls_client_auth" | undefined;
|
|
7
|
-
token_endpoint_auth_signing_alg?: string | undefined;
|
|
8
|
-
userinfo_signed_response_alg?: string | undefined;
|
|
9
|
-
userinfo_encrypted_response_alg?: string | undefined;
|
|
10
|
-
jwks_uri?: string | undefined;
|
|
11
|
-
jwks?: {
|
|
12
|
-
keys: ({
|
|
13
|
-
kty: "RSA";
|
|
14
|
-
n: string;
|
|
15
|
-
e: string;
|
|
16
|
-
alg?: "RS256" | "RS384" | "RS512" | "PS256" | "PS384" | "PS512" | undefined;
|
|
17
|
-
kid?: string | undefined;
|
|
18
|
-
ext?: boolean | undefined;
|
|
19
|
-
use?: "sig" | "enc" | undefined;
|
|
20
|
-
key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
|
21
|
-
x5c?: string[] | undefined;
|
|
22
|
-
x5t?: string | undefined;
|
|
23
|
-
"x5t#S256"?: string | undefined;
|
|
24
|
-
x5u?: string | undefined;
|
|
25
|
-
d?: string | undefined;
|
|
26
|
-
p?: string | undefined;
|
|
27
|
-
q?: string | undefined;
|
|
28
|
-
dp?: string | undefined;
|
|
29
|
-
dq?: string | undefined;
|
|
30
|
-
qi?: string | undefined;
|
|
31
|
-
oth?: [{
|
|
32
|
-
d?: string | undefined;
|
|
33
|
-
r?: string | undefined;
|
|
34
|
-
t?: string | undefined;
|
|
35
|
-
}, ...{
|
|
36
|
-
d?: string | undefined;
|
|
37
|
-
r?: string | undefined;
|
|
38
|
-
t?: string | undefined;
|
|
39
|
-
}[]] | undefined;
|
|
40
|
-
} | {
|
|
41
|
-
kty: "EC";
|
|
42
|
-
crv: "P-256" | "P-384" | "P-521";
|
|
43
|
-
x: string;
|
|
44
|
-
y: string;
|
|
45
|
-
alg?: "ES256" | "ES384" | "ES512" | undefined;
|
|
46
|
-
kid?: string | undefined;
|
|
47
|
-
ext?: boolean | undefined;
|
|
48
|
-
use?: "sig" | "enc" | undefined;
|
|
49
|
-
key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
|
50
|
-
x5c?: string[] | undefined;
|
|
51
|
-
x5t?: string | undefined;
|
|
52
|
-
"x5t#S256"?: string | undefined;
|
|
53
|
-
x5u?: string | undefined;
|
|
54
|
-
d?: string | undefined;
|
|
55
|
-
} | {
|
|
56
|
-
kty: "EC";
|
|
57
|
-
crv: "secp256k1";
|
|
58
|
-
x: string;
|
|
59
|
-
y: string;
|
|
60
|
-
alg?: "ES256K" | undefined;
|
|
61
|
-
kid?: string | undefined;
|
|
62
|
-
ext?: boolean | undefined;
|
|
63
|
-
use?: "sig" | "enc" | undefined;
|
|
64
|
-
key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
|
65
|
-
x5c?: string[] | undefined;
|
|
66
|
-
x5t?: string | undefined;
|
|
67
|
-
"x5t#S256"?: string | undefined;
|
|
68
|
-
x5u?: string | undefined;
|
|
69
|
-
d?: string | undefined;
|
|
70
|
-
} | {
|
|
71
|
-
kty: "OKP";
|
|
72
|
-
crv: "Ed25519" | "Ed448";
|
|
73
|
-
x: string;
|
|
74
|
-
alg?: "EdDSA" | undefined;
|
|
75
|
-
kid?: string | undefined;
|
|
76
|
-
ext?: boolean | undefined;
|
|
77
|
-
use?: "sig" | "enc" | undefined;
|
|
78
|
-
key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
|
79
|
-
x5c?: string[] | undefined;
|
|
80
|
-
x5t?: string | undefined;
|
|
81
|
-
"x5t#S256"?: string | undefined;
|
|
82
|
-
x5u?: string | undefined;
|
|
83
|
-
d?: string | undefined;
|
|
84
|
-
} | {
|
|
85
|
-
kty: "oct";
|
|
86
|
-
k: string;
|
|
87
|
-
alg?: "HS256" | "HS384" | "HS512" | undefined;
|
|
88
|
-
kid?: string | undefined;
|
|
89
|
-
ext?: boolean | undefined;
|
|
90
|
-
use?: "sig" | "enc" | undefined;
|
|
91
|
-
key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
|
92
|
-
x5c?: string[] | undefined;
|
|
93
|
-
x5t?: string | undefined;
|
|
94
|
-
"x5t#S256"?: string | undefined;
|
|
95
|
-
x5u?: string | undefined;
|
|
96
|
-
} | {
|
|
97
|
-
kty: string;
|
|
98
|
-
alg?: string | undefined;
|
|
99
|
-
kid?: string | undefined;
|
|
100
|
-
ext?: boolean | undefined;
|
|
101
|
-
use?: "sig" | "enc" | undefined;
|
|
102
|
-
key_ops?: ("sign" | "verify" | "encrypt" | "decrypt" | "wrapKey" | "unwrapKey" | "deriveKey" | "deriveBits")[] | undefined;
|
|
103
|
-
x5c?: string[] | undefined;
|
|
104
|
-
x5t?: string | undefined;
|
|
105
|
-
"x5t#S256"?: string | undefined;
|
|
106
|
-
x5u?: string | undefined;
|
|
107
|
-
})[];
|
|
108
|
-
} | undefined;
|
|
109
|
-
application_type?: "web" | "native" | undefined;
|
|
110
|
-
subject_type?: "public" | "pairwise" | undefined;
|
|
111
|
-
request_object_signing_alg?: string | undefined;
|
|
112
|
-
id_token_signed_response_alg?: string | undefined;
|
|
113
|
-
authorization_signed_response_alg?: string | undefined;
|
|
114
|
-
authorization_encrypted_response_enc?: "A128CBC-HS256" | undefined;
|
|
115
|
-
authorization_encrypted_response_alg?: string | undefined;
|
|
116
|
-
client_id?: string | undefined;
|
|
117
|
-
client_name?: string | undefined;
|
|
118
|
-
client_uri?: string | undefined;
|
|
119
|
-
policy_uri?: string | undefined;
|
|
120
|
-
tos_uri?: string | undefined;
|
|
121
|
-
logo_uri?: string | undefined;
|
|
122
|
-
default_max_age?: number | undefined;
|
|
123
|
-
require_auth_time?: boolean | undefined;
|
|
124
|
-
contacts?: string[] | undefined;
|
|
125
|
-
tls_client_certificate_bound_access_tokens?: boolean | undefined;
|
|
126
|
-
dpop_bound_access_tokens?: boolean | undefined;
|
|
127
|
-
authorization_details_types?: string[] | undefined;
|
|
128
|
-
}>;
|
|
1
|
+
declare const _default: any;
|
|
129
2
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { H3Event, SessionConfig } from 'h3';
|
|
2
2
|
import { useSession } from 'h3';
|
|
3
3
|
import type { OmitWithIndexSignature } from '../../types/utils.js';
|
|
4
|
-
import type { UserSession, UserSessionRequired } from '#auth-utils';
|
|
5
|
-
type UseSessionEvent = Parameters<typeof useSession>[0];
|
|
4
|
+
import type { SessionEvent, UserSession, UserSessionRequired } from '#auth-utils';
|
|
5
|
+
type UseSessionEvent = Parameters<typeof useSession>[0] | SessionEvent;
|
|
6
6
|
export interface SessionHooks {
|
|
7
7
|
/**
|
|
8
8
|
* Called when fetching the session from the API
|
|
@@ -28,19 +28,19 @@ export declare function getUserSession(event: UseSessionEvent): Promise<UserSess
|
|
|
28
28
|
* @param data User session data, please only store public information since it can be decoded with API calls
|
|
29
29
|
* @see https://github.com/atinux/nuxt-auth-utils
|
|
30
30
|
*/
|
|
31
|
-
export declare function setUserSession(event:
|
|
31
|
+
export declare function setUserSession(event: SessionEvent, data: OmitWithIndexSignature<UserSession, 'id'>, config?: Partial<SessionConfig>): Promise<UserSession>;
|
|
32
32
|
/**
|
|
33
33
|
* Replace a user session
|
|
34
34
|
* @param event The Request (h3) event
|
|
35
35
|
* @param data User session data, please only store public information since it can be decoded with API calls
|
|
36
36
|
*/
|
|
37
|
-
export declare function replaceUserSession(event:
|
|
37
|
+
export declare function replaceUserSession(event: SessionEvent, data: OmitWithIndexSignature<UserSession, 'id'>, config?: Partial<SessionConfig>): Promise<UserSession>;
|
|
38
38
|
/**
|
|
39
39
|
* Clear the user session and removing the session cookie
|
|
40
40
|
* @param event The Request (h3) event
|
|
41
41
|
* @returns true if the session was cleared
|
|
42
42
|
*/
|
|
43
|
-
export declare function clearUserSession(event:
|
|
43
|
+
export declare function clearUserSession(event: SessionEvent, config?: Partial<SessionConfig>): Promise<boolean>;
|
|
44
44
|
/**
|
|
45
45
|
* Require a user session, throw a 401 error if the user is not logged in
|
|
46
46
|
* @param event
|
|
File without changes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export type { User, UserSession, UserSessionRequired, UserSessionComposable, SecureSessionData } from './session.js';
|
|
2
|
+
export type { RequestEvent, SessionEvent } from './event.js';
|
|
2
3
|
export type { OAuthConfig, OAuthProvider, ATProtoProvider, OnError } from './oauth-config.js';
|
|
3
4
|
export type { WebAuthnCredential, WebAuthnRegisterEventHandlerOptions, WebAuthnAuthenticateEventHandlerOptions, WebAuthnComposable, WebAuthnUser, } from './webauthn.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-auth-utils",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.32",
|
|
4
4
|
"description": "Add Authentication to Nuxt applications with secured & sealed cookies sessions.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@adonisjs/hash": "^9.1.1",
|
|
43
43
|
"@nuxt/kit": "^4.3.1",
|
|
44
|
+
"@nuxt/schema": "^4.6.0",
|
|
44
45
|
"defu": "^6.1.4",
|
|
45
46
|
"h3": "^1.15.4",
|
|
46
47
|
"hookable": "^6.0.1",
|
|
@@ -76,14 +77,13 @@
|
|
|
76
77
|
"@nuxt/devtools": "3.2.1",
|
|
77
78
|
"@nuxt/eslint-config": "^1.15.1",
|
|
78
79
|
"@nuxt/module-builder": "^1.0.2",
|
|
79
|
-
"@nuxt/schema": "^4.3.1",
|
|
80
80
|
"@nuxt/test-utils": "^4.0.0",
|
|
81
|
-
"@types/node": "latest",
|
|
82
81
|
"@nuxt/ui": "^4.4.0",
|
|
83
82
|
"@simplewebauthn/types": "^12.0.0",
|
|
83
|
+
"@types/node": "latest",
|
|
84
84
|
"changelogen": "^0.6.2",
|
|
85
85
|
"eslint": "^10.0.0",
|
|
86
|
-
"nuxt": "^4.
|
|
86
|
+
"nuxt": "^4.6.0",
|
|
87
87
|
"typescript": "5.9.3",
|
|
88
88
|
"vitest": "^4.0.18",
|
|
89
89
|
"vue-tsc": "^3.2.4"
|