@absolutejs/auth 0.59.0 → 0.59.1
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/agents/index.d.ts +13 -0
- package/dist/cli/import/auth0.d.ts +2 -0
- package/dist/cli/import/clerk.d.ts +2 -0
- package/dist/cli/import/index.d.ts +10 -0
- package/dist/cli/import/lucia.d.ts +2 -0
- package/dist/cli/import/nextauth.d.ts +2 -0
- package/dist/cli/import/supabase.d.ts +2 -0
- package/dist/cli/import/types.d.ts +27 -0
- package/dist/cli/migrate.d.ts +2 -0
- package/dist/client/components/react/SignIn.d.ts +32 -0
- package/dist/client/components/react/SignUp.d.ts +29 -0
- package/dist/client/components/react/UserButton.d.ts +36 -0
- package/dist/client/createAuthClient.d.ts +285 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/passkeyHelpers.d.ts +19 -0
- package/dist/client/react.d.ts +87 -0
- package/dist/client/sessionExpiry.d.ts +37 -0
- package/dist/client/solid.d.ts +86 -0
- package/dist/client/svelte.d.ts +86 -0
- package/dist/client/vue.d.ts +88 -0
- package/dist/fingerprint-client/index.d.ts +26 -0
- package/dist/htmx/index.d.ts +2 -0
- package/dist/index.d.ts +3643 -0
- package/dist/linkedProviders/index.d.ts +3 -0
- package/dist/manifest.d.ts +18 -0
- package/dist/manifest.json +373 -0
- package/dist/oidc/index.d.ts +12 -0
- package/dist/oidc/operator.d.ts +14 -0
- package/dist/plugins/denyDisposableEmail.d.ts +7 -0
- package/dist/plugins/discordAlert.d.ts +7 -0
- package/dist/plugins/geoBlock.d.ts +8 -0
- package/dist/plugins/index.d.ts +12 -0
- package/dist/plugins/pagerdutyAlert.d.ts +9 -0
- package/dist/plugins/posthogIdentify.d.ts +7 -0
- package/dist/plugins/slackAlert.d.ts +7 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/saml.d.ts +1 -0
- package/dist/server.d.ts +32 -0
- package/dist/sso/nodeSamlAdapter.d.ts +8 -0
- package/dist/vault/index.d.ts +5 -0
- package/dist/webauthn/simpleWebAuthnAdapter.d.ts +3 -0
- package/dist/webauthn.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type Accessor } from 'solid-js';
|
|
2
|
+
import type { AuthClient, AuthClientError } from './createAuthClient';
|
|
3
|
+
type Mutator<Args, Data> = (args: Args) => Promise<{
|
|
4
|
+
data: Data | null;
|
|
5
|
+
error: AuthClientError | null;
|
|
6
|
+
}>;
|
|
7
|
+
type MutationState<Args, Data> = {
|
|
8
|
+
data: Accessor<Data | null>;
|
|
9
|
+
error: Accessor<AuthClientError | null>;
|
|
10
|
+
isPending: Accessor<boolean>;
|
|
11
|
+
mutate: Mutator<Args, Data>;
|
|
12
|
+
reset: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const useMagicLink: (client: AuthClient) => MutationState<{
|
|
15
|
+
email: string;
|
|
16
|
+
}, {
|
|
17
|
+
ok: true;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const useMfaChallenge: (client: AuthClient) => MutationState<{
|
|
20
|
+
code: string;
|
|
21
|
+
}, {
|
|
22
|
+
status: "authenticated";
|
|
23
|
+
}>;
|
|
24
|
+
export declare const usePasskeyAutofill: (client: AuthClient) => {
|
|
25
|
+
cancel: () => void;
|
|
26
|
+
data: Accessor<{
|
|
27
|
+
status: "authenticated";
|
|
28
|
+
} | null>;
|
|
29
|
+
error: Accessor<AuthClientError | null>;
|
|
30
|
+
isPending: Accessor<boolean>;
|
|
31
|
+
start: () => Promise<void>;
|
|
32
|
+
};
|
|
33
|
+
export declare const usePasswordReset: (client: AuthClient) => MutationState<{
|
|
34
|
+
email: string;
|
|
35
|
+
}, {
|
|
36
|
+
ok: true;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const useSessions: (client: AuthClient) => {
|
|
39
|
+
data: Accessor<unknown[] | null>;
|
|
40
|
+
error: Accessor<AuthClientError | null>;
|
|
41
|
+
isPending: Accessor<boolean>;
|
|
42
|
+
refetch: () => Promise<void>;
|
|
43
|
+
revoke: (sessionId: string) => Promise<{
|
|
44
|
+
data: null;
|
|
45
|
+
error: AuthClientError;
|
|
46
|
+
} | {
|
|
47
|
+
data: {
|
|
48
|
+
ok: true;
|
|
49
|
+
};
|
|
50
|
+
error: null;
|
|
51
|
+
}>;
|
|
52
|
+
};
|
|
53
|
+
export declare const useSignIn: (client: AuthClient) => MutationState<{
|
|
54
|
+
email: string;
|
|
55
|
+
password: string;
|
|
56
|
+
}, {
|
|
57
|
+
passwordCompromised?: boolean;
|
|
58
|
+
status: "authenticated" | "mfa_required";
|
|
59
|
+
}>;
|
|
60
|
+
export declare const useSignOut: (client: AuthClient) => MutationState<unknown, null>;
|
|
61
|
+
export declare const useSignUp: (client: AuthClient) => MutationState<{
|
|
62
|
+
[extra: string]: unknown;
|
|
63
|
+
email: string;
|
|
64
|
+
password: string;
|
|
65
|
+
}, {
|
|
66
|
+
status: "authenticated";
|
|
67
|
+
} | {
|
|
68
|
+
status: "verification_required";
|
|
69
|
+
}>;
|
|
70
|
+
export declare const useUpgradeToPasskey: (client: AuthClient) => {
|
|
71
|
+
error: Accessor<AuthClientError | null>;
|
|
72
|
+
isPending: Accessor<boolean>;
|
|
73
|
+
passkeys: Accessor<unknown[] | null>;
|
|
74
|
+
refetch: () => Promise<void>;
|
|
75
|
+
register: () => Promise<{
|
|
76
|
+
data: null;
|
|
77
|
+
error: AuthClientError;
|
|
78
|
+
} | {
|
|
79
|
+
data: {
|
|
80
|
+
ok: true;
|
|
81
|
+
};
|
|
82
|
+
error: null;
|
|
83
|
+
}>;
|
|
84
|
+
shouldPrompt: () => boolean;
|
|
85
|
+
};
|
|
86
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { type Writable } from 'svelte/store';
|
|
2
|
+
import type { AuthClient, AuthClientError } from './createAuthClient';
|
|
3
|
+
type Mutator<Args, Data> = (args: Args) => Promise<{
|
|
4
|
+
data: Data | null;
|
|
5
|
+
error: AuthClientError | null;
|
|
6
|
+
}>;
|
|
7
|
+
type MutationState<Args, Data> = {
|
|
8
|
+
data: Writable<Data | null>;
|
|
9
|
+
error: Writable<AuthClientError | null>;
|
|
10
|
+
isPending: Writable<boolean>;
|
|
11
|
+
mutate: Mutator<Args, Data>;
|
|
12
|
+
reset: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const useMagicLink: (client: AuthClient) => MutationState<{
|
|
15
|
+
email: string;
|
|
16
|
+
}, {
|
|
17
|
+
ok: true;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const useMfaChallenge: (client: AuthClient) => MutationState<{
|
|
20
|
+
code: string;
|
|
21
|
+
}, {
|
|
22
|
+
status: "authenticated";
|
|
23
|
+
}>;
|
|
24
|
+
export declare const usePasskeyAutofill: (client: AuthClient) => {
|
|
25
|
+
cancel: () => void;
|
|
26
|
+
data: Writable<{
|
|
27
|
+
status: "authenticated";
|
|
28
|
+
} | null>;
|
|
29
|
+
error: Writable<AuthClientError | null>;
|
|
30
|
+
isPending: Writable<boolean>;
|
|
31
|
+
start: () => Promise<void>;
|
|
32
|
+
};
|
|
33
|
+
export declare const usePasswordReset: (client: AuthClient) => MutationState<{
|
|
34
|
+
email: string;
|
|
35
|
+
}, {
|
|
36
|
+
ok: true;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const useSessions: (client: AuthClient) => {
|
|
39
|
+
data: Writable<unknown[] | null>;
|
|
40
|
+
error: Writable<AuthClientError | null>;
|
|
41
|
+
isPending: Writable<boolean>;
|
|
42
|
+
refetch: () => Promise<void>;
|
|
43
|
+
revoke: (sessionId: string) => Promise<{
|
|
44
|
+
data: null;
|
|
45
|
+
error: AuthClientError;
|
|
46
|
+
} | {
|
|
47
|
+
data: {
|
|
48
|
+
ok: true;
|
|
49
|
+
};
|
|
50
|
+
error: null;
|
|
51
|
+
}>;
|
|
52
|
+
};
|
|
53
|
+
export declare const useSignIn: (client: AuthClient) => MutationState<{
|
|
54
|
+
email: string;
|
|
55
|
+
password: string;
|
|
56
|
+
}, {
|
|
57
|
+
passwordCompromised?: boolean;
|
|
58
|
+
status: "authenticated" | "mfa_required";
|
|
59
|
+
}>;
|
|
60
|
+
export declare const useSignOut: (client: AuthClient) => MutationState<unknown, null>;
|
|
61
|
+
export declare const useSignUp: (client: AuthClient) => MutationState<{
|
|
62
|
+
[extra: string]: unknown;
|
|
63
|
+
email: string;
|
|
64
|
+
password: string;
|
|
65
|
+
}, {
|
|
66
|
+
status: "authenticated";
|
|
67
|
+
} | {
|
|
68
|
+
status: "verification_required";
|
|
69
|
+
}>;
|
|
70
|
+
export declare const useUpgradeToPasskey: (client: AuthClient) => {
|
|
71
|
+
error: Writable<AuthClientError | null>;
|
|
72
|
+
isPending: Writable<boolean>;
|
|
73
|
+
passkeys: Writable<unknown[] | null>;
|
|
74
|
+
refetch: () => Promise<void>;
|
|
75
|
+
register: () => Promise<{
|
|
76
|
+
data: null;
|
|
77
|
+
error: AuthClientError;
|
|
78
|
+
} | {
|
|
79
|
+
data: {
|
|
80
|
+
ok: true;
|
|
81
|
+
};
|
|
82
|
+
error: null;
|
|
83
|
+
}>;
|
|
84
|
+
shouldPrompt: Writable<boolean>;
|
|
85
|
+
};
|
|
86
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import type { AuthClient, AuthClientError } from './createAuthClient';
|
|
3
|
+
type Mutator<Args, Data> = (args: Args) => Promise<{
|
|
4
|
+
data: Data | null;
|
|
5
|
+
error: AuthClientError | null;
|
|
6
|
+
}>;
|
|
7
|
+
type MutationState<Args, Data> = {
|
|
8
|
+
data: Ref<Data | null>;
|
|
9
|
+
error: Ref<AuthClientError | null>;
|
|
10
|
+
isPending: Ref<boolean>;
|
|
11
|
+
mutate: Mutator<Args, Data>;
|
|
12
|
+
reset: () => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const useMagicLink: (client: AuthClient) => MutationState<{
|
|
15
|
+
email: string;
|
|
16
|
+
}, {
|
|
17
|
+
ok: true;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const useMfaChallenge: (client: AuthClient) => MutationState<{
|
|
20
|
+
code: string;
|
|
21
|
+
}, {
|
|
22
|
+
status: "authenticated";
|
|
23
|
+
}>;
|
|
24
|
+
export declare const usePasskeyAutofill: (client: AuthClient) => {
|
|
25
|
+
cancel: () => void;
|
|
26
|
+
data: Ref<{
|
|
27
|
+
status: "authenticated";
|
|
28
|
+
} | null, {
|
|
29
|
+
status: "authenticated";
|
|
30
|
+
} | null>;
|
|
31
|
+
error: Ref<AuthClientError | null, AuthClientError | null>;
|
|
32
|
+
isPending: Ref<boolean, boolean>;
|
|
33
|
+
start: () => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
export declare const usePasswordReset: (client: AuthClient) => MutationState<{
|
|
36
|
+
email: string;
|
|
37
|
+
}, {
|
|
38
|
+
ok: true;
|
|
39
|
+
}>;
|
|
40
|
+
export declare const useSessions: (client: AuthClient) => {
|
|
41
|
+
data: Ref<unknown[] | null, unknown[] | null>;
|
|
42
|
+
error: Ref<AuthClientError | null, AuthClientError | null>;
|
|
43
|
+
isPending: Ref<boolean, boolean>;
|
|
44
|
+
refetch: () => Promise<void>;
|
|
45
|
+
revoke: (sessionId: string) => Promise<{
|
|
46
|
+
data: null;
|
|
47
|
+
error: AuthClientError;
|
|
48
|
+
} | {
|
|
49
|
+
data: {
|
|
50
|
+
ok: true;
|
|
51
|
+
};
|
|
52
|
+
error: null;
|
|
53
|
+
}>;
|
|
54
|
+
};
|
|
55
|
+
export declare const useSignIn: (client: AuthClient) => MutationState<{
|
|
56
|
+
email: string;
|
|
57
|
+
password: string;
|
|
58
|
+
}, {
|
|
59
|
+
passwordCompromised?: boolean;
|
|
60
|
+
status: "authenticated" | "mfa_required";
|
|
61
|
+
}>;
|
|
62
|
+
export declare const useSignOut: (client: AuthClient) => MutationState<unknown, null>;
|
|
63
|
+
export declare const useSignUp: (client: AuthClient) => MutationState<{
|
|
64
|
+
[extra: string]: unknown;
|
|
65
|
+
email: string;
|
|
66
|
+
password: string;
|
|
67
|
+
}, {
|
|
68
|
+
status: "authenticated";
|
|
69
|
+
} | {
|
|
70
|
+
status: "verification_required";
|
|
71
|
+
}>;
|
|
72
|
+
export declare const useUpgradeToPasskey: (client: AuthClient) => {
|
|
73
|
+
error: Ref<AuthClientError | null, AuthClientError | null>;
|
|
74
|
+
isPending: Ref<boolean, boolean>;
|
|
75
|
+
passkeys: Ref<unknown[] | null, unknown[] | null>;
|
|
76
|
+
refetch: () => Promise<void>;
|
|
77
|
+
register: () => Promise<{
|
|
78
|
+
data: null;
|
|
79
|
+
error: AuthClientError;
|
|
80
|
+
} | {
|
|
81
|
+
data: {
|
|
82
|
+
ok: true;
|
|
83
|
+
};
|
|
84
|
+
error: null;
|
|
85
|
+
}>;
|
|
86
|
+
shouldPrompt: Ref<boolean, boolean>;
|
|
87
|
+
};
|
|
88
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type FingerprintSignals = {
|
|
2
|
+
audio?: number;
|
|
3
|
+
canvas?: string;
|
|
4
|
+
deviceMemory?: number;
|
|
5
|
+
fonts?: string[];
|
|
6
|
+
hardwareConcurrency?: number;
|
|
7
|
+
languages?: readonly string[];
|
|
8
|
+
pixelRatio?: number;
|
|
9
|
+
platform?: string;
|
|
10
|
+
screen?: {
|
|
11
|
+
colorDepth: number;
|
|
12
|
+
height: number;
|
|
13
|
+
width: number;
|
|
14
|
+
};
|
|
15
|
+
timezone?: string;
|
|
16
|
+
userAgent?: string;
|
|
17
|
+
webgl?: {
|
|
18
|
+
renderer?: string;
|
|
19
|
+
vendor?: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type DeviceFingerprint = {
|
|
23
|
+
deviceId: string;
|
|
24
|
+
signals: FingerprintSignals;
|
|
25
|
+
};
|
|
26
|
+
export declare const collectDeviceFingerprint: () => Promise<DeviceFingerprint>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { escapeHtml, resolveAuthHtmxRenderers } from './renderers';
|
|
2
|
+
export type { AuthHtmxClient, AuthHtmxConnectorTarget, AuthHtmxProviderData, AuthHtmxProviderInfo, AuthHtmxRenderersConfig, AuthHtmxRenderOverrides, AuthHtmxUser, AuthIdentityMergeRequestSummary, AuthIdentityPayload, AuthIdentitySummary, LinkedProviderBindingSummary, LinkedProviderGrantSummary, LinkedProviderPayload, ResolvedAuthHtmxRenderers } from './types';
|