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
package/dist/module.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: any;
|
|
2
2
|
export default _default;
|
|
@@ -22,7 +22,7 @@ type BlueSkyTokens = NodeSavedSession['tokenSet'];
|
|
|
22
22
|
export declare function defineOAuthBlueskyEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthBlueskyConfig, {
|
|
23
23
|
user: BlueSkyUser;
|
|
24
24
|
tokens: BlueSkyTokens;
|
|
25
|
-
}>):
|
|
25
|
+
}>): any;
|
|
26
26
|
export declare class StateStore implements NodeSavedStateStore {
|
|
27
27
|
private event;
|
|
28
28
|
private readonly stateKey;
|
|
@@ -91,5 +91,5 @@ export interface OAuthAtlassianConfig {
|
|
|
91
91
|
export declare function defineOAuthAtlassianEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthAtlassianConfig, {
|
|
92
92
|
user: AtlassianUser;
|
|
93
93
|
tokens: AtlassianTokens;
|
|
94
|
-
}>):
|
|
94
|
+
}>): any;
|
|
95
95
|
export {};
|
|
@@ -52,7 +52,7 @@ export function defineOAuthAtlassianEventHandler({
|
|
|
52
52
|
if (!onError) throw error;
|
|
53
53
|
return onError(event, error);
|
|
54
54
|
}
|
|
55
|
-
if (query.state !== state) {
|
|
55
|
+
if (!state || query.state !== state) {
|
|
56
56
|
return handleInvalidState(event, "atlassian", onError);
|
|
57
57
|
}
|
|
58
58
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -57,4 +57,4 @@ export interface OAuthAuth0Config {
|
|
|
57
57
|
*/
|
|
58
58
|
redirectURL?: string;
|
|
59
59
|
}
|
|
60
|
-
export declare function defineOAuthAuth0EventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthAuth0Config>):
|
|
60
|
+
export declare function defineOAuthAuth0EventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthAuth0Config>): any;
|
|
@@ -47,7 +47,7 @@ export function defineOAuthAuth0EventHandler({ config, onSuccess, onError }) {
|
|
|
47
47
|
})
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
if (query.state !== state) {
|
|
50
|
+
if (!state || query.state !== state) {
|
|
51
51
|
return handleInvalidState(event, "auth0", onError);
|
|
52
52
|
}
|
|
53
53
|
const tokens = await requestAccessToken(tokenURL, {
|
|
@@ -27,4 +27,4 @@ export interface OAuthAuthentikConfig {
|
|
|
27
27
|
*/
|
|
28
28
|
scope?: string[];
|
|
29
29
|
}
|
|
30
|
-
export declare function defineOAuthAuthentikEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthAuthentikConfig>):
|
|
30
|
+
export declare function defineOAuthAuthentikEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthAuthentikConfig>): any;
|
|
@@ -35,7 +35,7 @@ export function defineOAuthAuthentikEventHandler({ config, onSuccess, onError })
|
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
|
-
if (query.state !== state) {
|
|
38
|
+
if (!state || query.state !== state) {
|
|
39
39
|
return handleInvalidState(event, "authentik", onError);
|
|
40
40
|
}
|
|
41
41
|
const tokens = await requestAccessToken(tokenURL, {
|
|
@@ -51,4 +51,4 @@ export interface OAuthAzureB2CConfig {
|
|
|
51
51
|
*/
|
|
52
52
|
redirectURL?: string;
|
|
53
53
|
}
|
|
54
|
-
export declare function defineOAuthAzureB2CEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthAzureB2CConfig>):
|
|
54
|
+
export declare function defineOAuthAzureB2CEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthAzureB2CConfig>): any;
|
|
@@ -34,7 +34,7 @@ export function defineOAuthAzureB2CEventHandler({ config, onSuccess, onError })
|
|
|
34
34
|
})
|
|
35
35
|
);
|
|
36
36
|
}
|
|
37
|
-
if (query.state !== state) {
|
|
37
|
+
if (!state || query.state !== state) {
|
|
38
38
|
return handleInvalidState(event, "azureb2c", onError);
|
|
39
39
|
}
|
|
40
40
|
const tokens = await requestAccessToken(tokenURL, {
|
|
@@ -45,4 +45,4 @@ export interface OAuthBattledotnetConfig {
|
|
|
45
45
|
*/
|
|
46
46
|
redirectURL?: string;
|
|
47
47
|
}
|
|
48
|
-
export declare function defineOAuthBattledotnetEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthBattledotnetConfig>):
|
|
48
|
+
export declare function defineOAuthBattledotnetEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthBattledotnetConfig>): any;
|
|
@@ -49,7 +49,7 @@ export function defineOAuthBattledotnetEventHandler({ config, onSuccess, onError
|
|
|
49
49
|
})
|
|
50
50
|
);
|
|
51
51
|
}
|
|
52
|
-
if (query.state !== state) {
|
|
52
|
+
if (!state || query.state !== state) {
|
|
53
53
|
return handleInvalidState(event, "battledotnet", onError);
|
|
54
54
|
}
|
|
55
55
|
config.scope = config.scope || [];
|
|
@@ -91,5 +91,5 @@ interface OAuthBoxTokens {
|
|
|
91
91
|
export declare function defineOAuthBoxEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthBoxConfig, {
|
|
92
92
|
user: OAuthBoxUser;
|
|
93
93
|
tokens: OAuthBoxTokens;
|
|
94
|
-
}>):
|
|
94
|
+
}>): any;
|
|
95
95
|
export {};
|
|
@@ -41,7 +41,7 @@ export function defineOAuthBoxEventHandler({ config, onSuccess, onError }) {
|
|
|
41
41
|
})
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
|
-
if (query.state !== state) {
|
|
44
|
+
if (!state || query.state !== state) {
|
|
45
45
|
return handleInvalidState(event, "box", onError);
|
|
46
46
|
}
|
|
47
47
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -36,4 +36,4 @@ export interface OAuthCognitoConfig {
|
|
|
36
36
|
*/
|
|
37
37
|
redirectURL?: string;
|
|
38
38
|
}
|
|
39
|
-
export declare function defineOAuthCognitoEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthCognitoConfig>):
|
|
39
|
+
export declare function defineOAuthCognitoEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthCognitoConfig>): any;
|
|
@@ -39,7 +39,7 @@ export function defineOAuthCognitoEventHandler({ 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, "cognito", onError);
|
|
44
44
|
}
|
|
45
45
|
const tokens = await requestAccessToken(
|
|
@@ -50,4 +50,4 @@ export interface OAuthDiscordConfig {
|
|
|
50
50
|
*/
|
|
51
51
|
redirectURL?: string;
|
|
52
52
|
}
|
|
53
|
-
export declare function defineOAuthDiscordEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthDiscordConfig>):
|
|
53
|
+
export declare function defineOAuthDiscordEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthDiscordConfig>): any;
|
|
@@ -40,7 +40,7 @@ export function defineOAuthDiscordEventHandler({ config, onSuccess, onError }) {
|
|
|
40
40
|
})
|
|
41
41
|
);
|
|
42
42
|
}
|
|
43
|
-
if (query.state !== state) {
|
|
43
|
+
if (!state || query.state !== state) {
|
|
44
44
|
return handleInvalidState(event, "discord", onError);
|
|
45
45
|
}
|
|
46
46
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -44,4 +44,4 @@ export interface OAuthDropboxConfig {
|
|
|
44
44
|
*/
|
|
45
45
|
redirectURL?: string;
|
|
46
46
|
}
|
|
47
|
-
export declare function defineOAuthDropboxEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthDropboxConfig>):
|
|
47
|
+
export declare function defineOAuthDropboxEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthDropboxConfig>): any;
|
|
@@ -36,7 +36,7 @@ export function defineOAuthDropboxEventHandler({ config, onSuccess, onError }) {
|
|
|
36
36
|
})
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
|
-
if (query.state !== state) {
|
|
39
|
+
if (!state || query.state !== state) {
|
|
40
40
|
return handleInvalidState(event, "dropbox", onError);
|
|
41
41
|
}
|
|
42
42
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -45,4 +45,4 @@ export interface OAuthFacebookConfig {
|
|
|
45
45
|
*/
|
|
46
46
|
redirectURL?: string;
|
|
47
47
|
}
|
|
48
|
-
export declare function defineOAuthFacebookEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthFacebookConfig>):
|
|
48
|
+
export declare function defineOAuthFacebookEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthFacebookConfig>): any;
|
|
@@ -42,7 +42,7 @@ export function defineOAuthFacebookEventHandler({
|
|
|
42
42
|
})
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
if (query.state !== state) {
|
|
45
|
+
if (!state || query.state !== state) {
|
|
46
46
|
return handleInvalidState(event, "facebook", onError);
|
|
47
47
|
}
|
|
48
48
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -48,4 +48,4 @@ export interface OAuthGiteaConfig {
|
|
|
48
48
|
*/
|
|
49
49
|
baseURL?: string;
|
|
50
50
|
}
|
|
51
|
-
export declare function defineOAuthGiteaEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthGiteaConfig>):
|
|
51
|
+
export declare function defineOAuthGiteaEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthGiteaConfig>): any;
|
|
@@ -93,5 +93,5 @@ interface GitHubTokens {
|
|
|
93
93
|
export declare function defineOAuthGitHubEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthGitHubConfig, {
|
|
94
94
|
user: GitHubUser;
|
|
95
95
|
tokens: GitHubTokens;
|
|
96
|
-
}>):
|
|
96
|
+
}>): any;
|
|
97
97
|
export {};
|
|
@@ -42,7 +42,7 @@ export function defineOAuthGitHubEventHandler({ config, onSuccess, onError }) {
|
|
|
42
42
|
})
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
if (query.state !== state) {
|
|
45
|
+
if (!state || query.state !== state) {
|
|
46
46
|
return handleInvalidState(event, "github", onError);
|
|
47
47
|
}
|
|
48
48
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -49,4 +49,4 @@ export interface OAuthGitLabConfig {
|
|
|
49
49
|
*/
|
|
50
50
|
baseURL?: string;
|
|
51
51
|
}
|
|
52
|
-
export declare function defineOAuthGitLabEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthGitLabConfig>):
|
|
52
|
+
export declare function defineOAuthGitLabEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthGitLabConfig>): any;
|
|
@@ -63,7 +63,7 @@ export function defineOAuthGitLabEventHandler({
|
|
|
63
63
|
})
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
|
-
if (query.state !== state) {
|
|
66
|
+
if (!state || query.state !== state) {
|
|
67
67
|
return handleInvalidState(event, "gitlab", onError);
|
|
68
68
|
}
|
|
69
69
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -44,4 +44,4 @@ export interface OAuthGoogleConfig {
|
|
|
44
44
|
*/
|
|
45
45
|
redirectURL?: string;
|
|
46
46
|
}
|
|
47
|
-
export declare function defineOAuthGoogleEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthGoogleConfig>):
|
|
47
|
+
export declare function defineOAuthGoogleEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthGoogleConfig>): any;
|
|
@@ -35,7 +35,7 @@ export function defineOAuthGoogleEventHandler({
|
|
|
35
35
|
})
|
|
36
36
|
);
|
|
37
37
|
}
|
|
38
|
-
if (query.state !== state) {
|
|
38
|
+
if (!state || query.state !== state) {
|
|
39
39
|
return handleInvalidState(event, "google", onError);
|
|
40
40
|
}
|
|
41
41
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -38,4 +38,4 @@ export interface OAuthHerokuConfig {
|
|
|
38
38
|
*/
|
|
39
39
|
redirectURL?: string;
|
|
40
40
|
}
|
|
41
|
-
export declare function defineOAuthHerokuEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthHerokuConfig>):
|
|
41
|
+
export declare function defineOAuthHerokuEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthHerokuConfig>): any;
|
|
@@ -45,7 +45,7 @@ export function defineOAuthHerokuEventHandler({
|
|
|
45
45
|
})
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
|
-
if (query.state !== state) {
|
|
48
|
+
if (!state || query.state !== state) {
|
|
49
49
|
return handleInvalidState(event, "heroku", onError);
|
|
50
50
|
}
|
|
51
51
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -23,4 +23,4 @@ export interface OAuthHubspotConfig {
|
|
|
23
23
|
*/
|
|
24
24
|
scope?: string[];
|
|
25
25
|
}
|
|
26
|
-
export declare function defineOAuthHubspotEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthHubspotConfig>):
|
|
26
|
+
export declare function defineOAuthHubspotEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthHubspotConfig>): any;
|
|
@@ -33,7 +33,7 @@ export function defineOAuthHubspotEventHandler({ 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, "hubspot", onError);
|
|
38
38
|
}
|
|
39
39
|
const tokens = await requestAccessToken(
|
|
@@ -45,4 +45,4 @@ export interface OAuthInstagramConfig {
|
|
|
45
45
|
*/
|
|
46
46
|
redirectURL?: string;
|
|
47
47
|
}
|
|
48
|
-
export declare function defineOAuthInstagramEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthInstagramConfig>):
|
|
48
|
+
export declare function defineOAuthInstagramEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthInstagramConfig>): any;
|
|
@@ -47,7 +47,7 @@ export function defineOAuthInstagramEventHandler({
|
|
|
47
47
|
})
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
|
-
if (query.state !== state) {
|
|
50
|
+
if (!state || query.state !== state) {
|
|
51
51
|
return handleInvalidState(event, "instagram", onError);
|
|
52
52
|
}
|
|
53
53
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -45,4 +45,4 @@ export interface OAuthKeycloakConfig {
|
|
|
45
45
|
*/
|
|
46
46
|
redirectURL?: string;
|
|
47
47
|
}
|
|
48
|
-
export declare function defineOAuthKeycloakEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthKeycloakConfig>):
|
|
48
|
+
export declare function defineOAuthKeycloakEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthKeycloakConfig>): any;
|
|
@@ -51,5 +51,5 @@ interface KickTokens {
|
|
|
51
51
|
export declare function defineOAuthKickEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthKickConfig, {
|
|
52
52
|
user: KickUser;
|
|
53
53
|
tokens: KickTokens;
|
|
54
|
-
}>):
|
|
54
|
+
}>): any;
|
|
55
55
|
export {};
|
|
@@ -33,7 +33,7 @@ export function defineOAuthKickEventHandler({ 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, "kick", onError);
|
|
38
38
|
}
|
|
39
39
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -42,4 +42,4 @@ export interface OAuthLineConfig {
|
|
|
42
42
|
*/
|
|
43
43
|
redirectURL?: string;
|
|
44
44
|
}
|
|
45
|
-
export declare function defineOAuthLineEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthLineConfig>):
|
|
45
|
+
export declare function defineOAuthLineEventHandler({ config, onSuccess, onError, }: OAuthConfig<OAuthLineConfig>): any;
|
|
@@ -38,4 +38,4 @@ export interface OAuthLinearConfig {
|
|
|
38
38
|
*/
|
|
39
39
|
redirectURL?: string;
|
|
40
40
|
}
|
|
41
|
-
export declare function defineOAuthLinearEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthLinearConfig>):
|
|
41
|
+
export declare function defineOAuthLinearEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthLinearConfig>): any;
|
|
@@ -39,7 +39,7 @@ export function defineOAuthLinearEventHandler({ 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, "linear", onError);
|
|
44
44
|
}
|
|
45
45
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -42,4 +42,4 @@ export interface OAuthLinkedInConfig {
|
|
|
42
42
|
*/
|
|
43
43
|
redirectURL?: string;
|
|
44
44
|
}
|
|
45
|
-
export declare function defineOAuthLinkedInEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthLinkedInConfig>):
|
|
45
|
+
export declare function defineOAuthLinkedInEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthLinkedInConfig>): any;
|
|
@@ -36,7 +36,7 @@ export function defineOAuthLinkedInEventHandler({ config, onSuccess, onError })
|
|
|
36
36
|
})
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
|
-
if (query.state !== state) {
|
|
39
|
+
if (!state || query.state !== state) {
|
|
40
40
|
return handleInvalidState(event, "linkedin", onError);
|
|
41
41
|
}
|
|
42
42
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -70,4 +70,4 @@ export interface LiveChatConfig {
|
|
|
70
70
|
*/
|
|
71
71
|
authorizationParams?: Record<string, string>;
|
|
72
72
|
}
|
|
73
|
-
export declare function defineOAuthLiveChatEventHandler({ config, onSuccess, onError, }: OAuthConfig<LiveChatConfig>):
|
|
73
|
+
export declare function defineOAuthLiveChatEventHandler({ config, onSuccess, onError, }: OAuthConfig<LiveChatConfig>): any;
|
|
@@ -46,7 +46,7 @@ export function defineOAuthLiveChatEventHandler({
|
|
|
46
46
|
})
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
|
-
if (query.state !== state) {
|
|
49
|
+
if (!state || query.state !== state) {
|
|
50
50
|
return handleInvalidState(event, "livechat", onError);
|
|
51
51
|
}
|
|
52
52
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -51,4 +51,4 @@ export interface OAuthMicrosoftConfig {
|
|
|
51
51
|
*/
|
|
52
52
|
redirectURL?: string;
|
|
53
53
|
}
|
|
54
|
-
export declare function defineOAuthMicrosoftEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthMicrosoftConfig>):
|
|
54
|
+
export declare function defineOAuthMicrosoftEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthMicrosoftConfig>): any;
|
|
@@ -31,7 +31,7 @@ export function defineOAuthMicrosoftEventHandler({ config, onSuccess, onError })
|
|
|
31
31
|
})
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
|
-
if (query.state !== state) {
|
|
34
|
+
if (!state || query.state !== state) {
|
|
35
35
|
return handleInvalidState(event, "microsoft", onError);
|
|
36
36
|
}
|
|
37
37
|
const tokens = await requestAccessToken(tokenURL, {
|
|
@@ -211,5 +211,5 @@ interface OIDCConfiguration {
|
|
|
211
211
|
export declare function defineOAuthOidcEventHandler<TUser = OidcUser>({ config, onSuccess, onError }: OAuthConfig<OAuthOidcConfig, {
|
|
212
212
|
user: TUser;
|
|
213
213
|
tokens: OidcTokens;
|
|
214
|
-
}>):
|
|
214
|
+
}>): any;
|
|
215
215
|
export {};
|
|
@@ -44,7 +44,7 @@ export function defineOAuthOidcEventHandler({ config, onSuccess, onError }) {
|
|
|
44
44
|
withQuery(oidcConfig.authorization_endpoint, authQuery)
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
if (query.state !== state) {
|
|
47
|
+
if (!state || query.state !== state) {
|
|
48
48
|
return handleInvalidState(event, "oidc", onError);
|
|
49
49
|
}
|
|
50
50
|
const tokenQuery = {
|
|
@@ -85,4 +85,4 @@ export interface OAuthOktaConfig {
|
|
|
85
85
|
*/
|
|
86
86
|
openIdConfigCacheTTL?: number;
|
|
87
87
|
}
|
|
88
|
-
export declare function defineOAuthOktaEventHandler({ config, onSuccess, onError }: OAuthConfigExt<OAuthOktaConfig>):
|
|
88
|
+
export declare function defineOAuthOktaEventHandler({ config, onSuccess, onError }: OAuthConfigExt<OAuthOktaConfig>): any;
|
|
@@ -113,7 +113,7 @@ export function defineOAuthOktaEventHandler({ config, onSuccess, onError }) {
|
|
|
113
113
|
})
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
if (query.state !== state) {
|
|
116
|
+
if (!state || query.state !== state) {
|
|
117
117
|
return handleInvalidState(event, "okta", onError);
|
|
118
118
|
}
|
|
119
119
|
const tokens = await requestAccessToken(tokenURL, {
|
|
@@ -48,4 +48,4 @@ export interface OAuthOryConfig {
|
|
|
48
48
|
*/
|
|
49
49
|
userURL?: string;
|
|
50
50
|
}
|
|
51
|
-
export declare function defineOAuthOryEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthOryConfig>):
|
|
51
|
+
export declare function defineOAuthOryEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthOryConfig>): any;
|
|
@@ -56,7 +56,7 @@ export function defineOAuthOryEventHandler({ config, onSuccess, onError }) {
|
|
|
56
56
|
})
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
|
-
if (query.state !== state) {
|
|
59
|
+
if (!state || query.state !== state) {
|
|
60
60
|
return handleInvalidState(event, "ory", onError);
|
|
61
61
|
}
|
|
62
62
|
const tokenURL = `${config.sdkURL}${config.tokenURL}`;
|
|
@@ -39,4 +39,4 @@ export interface OAuthOsuConfig {
|
|
|
39
39
|
*/
|
|
40
40
|
redirectURL?: string;
|
|
41
41
|
}
|
|
42
|
-
export declare function defineOAuthOsuEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthOsuConfig>):
|
|
42
|
+
export declare function defineOAuthOsuEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthOsuConfig>): any;
|
|
@@ -33,7 +33,7 @@ export function defineOAuthOsuEventHandler({ 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, "osu", onError);
|
|
38
38
|
}
|
|
39
39
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -49,4 +49,4 @@ export interface OAuthPaypalConfig {
|
|
|
49
49
|
*/
|
|
50
50
|
redirectURL?: string;
|
|
51
51
|
}
|
|
52
|
-
export declare function defineOAuthPaypalEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthPaypalConfig>):
|
|
52
|
+
export declare function defineOAuthPaypalEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthPaypalConfig>): any;
|
|
@@ -44,7 +44,7 @@ export function defineOAuthPaypalEventHandler({ config, onSuccess, onError }) {
|
|
|
44
44
|
})
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
if (query.state !== state) {
|
|
47
|
+
if (!state || query.state !== state) {
|
|
48
48
|
return handleInvalidState(event, "paypal", onError);
|
|
49
49
|
}
|
|
50
50
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -46,4 +46,4 @@ export interface OAuthPolarConfig {
|
|
|
46
46
|
*/
|
|
47
47
|
redirectURL?: string;
|
|
48
48
|
}
|
|
49
|
-
export declare function defineOAuthPolarEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthPolarConfig>):
|
|
49
|
+
export declare function defineOAuthPolarEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthPolarConfig>): any;
|
|
@@ -33,7 +33,7 @@ export function defineOAuthPolarEventHandler({ 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, "polar", onError);
|
|
38
38
|
}
|
|
39
39
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -70,5 +70,5 @@ interface RiotGamesTokens {
|
|
|
70
70
|
export declare function defineOAuthRiotGamesEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthRiotGamesConfig, {
|
|
71
71
|
user: RiotGamesUser;
|
|
72
72
|
tokens: RiotGamesTokens;
|
|
73
|
-
}>):
|
|
73
|
+
}>): any;
|
|
74
74
|
export {};
|
|
@@ -43,7 +43,7 @@ export function defineOAuthRiotGamesEventHandler({ config, onSuccess, onError })
|
|
|
43
43
|
})
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
|
-
if (query.state !== state) {
|
|
46
|
+
if (!state || query.state !== state) {
|
|
47
47
|
return handleInvalidState(event, "riotgames", onError);
|
|
48
48
|
}
|
|
49
49
|
const tokens = await requestAccessToken(config.tokenURL, {
|
|
@@ -123,4 +123,4 @@ export interface OAuthRobloxUser {
|
|
|
123
123
|
visibility: 'SOCIAL_NETWORK_VISIBILITY_UNSPECIFIED' | 'NO_ONE' | 'FRIENDS' | 'FRIENDS_AND_FOLLOWING' | 'FRIENDS_FOLLOWING_AND_FOLLOWERS' | 'EVERYONE';
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
export declare function defineOAuthRobloxEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthRobloxConfig>):
|
|
126
|
+
export declare function defineOAuthRobloxEventHandler({ config, onSuccess, onError }: OAuthConfig<OAuthRobloxConfig>): any;
|