@better-auth/passkey 1.5.0 → 1.5.1-beta.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/client.d.mts +1 -2
- package/dist/index-D7iFzFli.d.mts +708 -0
- package/dist/index.d.mts +2 -585
- package/package.json +6 -6
- package/dist/types-BEqo908g.d.mts +0 -127
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { CredentialDeviceType } from "@simplewebauthn/server";
|
|
2
|
-
import { InferOptionSchema } from "better-auth/types";
|
|
3
|
-
|
|
4
|
-
//#region src/schema.d.ts
|
|
5
|
-
declare const schema: {
|
|
6
|
-
passkey: {
|
|
7
|
-
fields: {
|
|
8
|
-
name: {
|
|
9
|
-
type: "string";
|
|
10
|
-
required: false;
|
|
11
|
-
};
|
|
12
|
-
publicKey: {
|
|
13
|
-
type: "string";
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
userId: {
|
|
17
|
-
type: "string";
|
|
18
|
-
references: {
|
|
19
|
-
model: string;
|
|
20
|
-
field: string;
|
|
21
|
-
};
|
|
22
|
-
required: true;
|
|
23
|
-
index: true;
|
|
24
|
-
};
|
|
25
|
-
credentialID: {
|
|
26
|
-
type: "string";
|
|
27
|
-
required: true;
|
|
28
|
-
index: true;
|
|
29
|
-
};
|
|
30
|
-
counter: {
|
|
31
|
-
type: "number";
|
|
32
|
-
required: true;
|
|
33
|
-
};
|
|
34
|
-
deviceType: {
|
|
35
|
-
type: "string";
|
|
36
|
-
required: true;
|
|
37
|
-
};
|
|
38
|
-
backedUp: {
|
|
39
|
-
type: "boolean";
|
|
40
|
-
required: true;
|
|
41
|
-
};
|
|
42
|
-
transports: {
|
|
43
|
-
type: "string";
|
|
44
|
-
required: false;
|
|
45
|
-
};
|
|
46
|
-
createdAt: {
|
|
47
|
-
type: "date";
|
|
48
|
-
required: false;
|
|
49
|
-
};
|
|
50
|
-
aaguid: {
|
|
51
|
-
type: "string";
|
|
52
|
-
required: false;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region src/types.d.ts
|
|
59
|
-
/**
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
|
-
interface WebAuthnChallengeValue {
|
|
63
|
-
expectedChallenge: string;
|
|
64
|
-
userData: {
|
|
65
|
-
id: string;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
interface PasskeyOptions {
|
|
69
|
-
/**
|
|
70
|
-
* A unique identifier for your website. 'localhost' is okay for
|
|
71
|
-
* local dev
|
|
72
|
-
*
|
|
73
|
-
* @default "localhost"
|
|
74
|
-
*/
|
|
75
|
-
rpID?: string | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* Human-readable title for your website
|
|
78
|
-
*
|
|
79
|
-
* @default "Better Auth"
|
|
80
|
-
*/
|
|
81
|
-
rpName?: string | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* The URL at which registrations and authentications should occur.
|
|
84
|
-
* `http://localhost` and `http://localhost:PORT` are also valid.
|
|
85
|
-
* Do NOT include any trailing /
|
|
86
|
-
*
|
|
87
|
-
* if this isn't provided. The client itself will
|
|
88
|
-
* pass this value.
|
|
89
|
-
*/
|
|
90
|
-
origin?: (string | string[] | null) | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Allow customization of the authenticatorSelection options
|
|
93
|
-
* during passkey registration.
|
|
94
|
-
*/
|
|
95
|
-
authenticatorSelection?: AuthenticatorSelectionCriteria | undefined;
|
|
96
|
-
/**
|
|
97
|
-
* Advanced options
|
|
98
|
-
*/
|
|
99
|
-
advanced?: {
|
|
100
|
-
/**
|
|
101
|
-
* Cookie name for storing WebAuthn challenge ID during authentication flow
|
|
102
|
-
*
|
|
103
|
-
* @default "better-auth-passkey"
|
|
104
|
-
*/
|
|
105
|
-
webAuthnChallengeCookie?: string;
|
|
106
|
-
} | undefined;
|
|
107
|
-
/**
|
|
108
|
-
* Schema for the passkey model
|
|
109
|
-
*/
|
|
110
|
-
schema?: InferOptionSchema<typeof schema> | undefined;
|
|
111
|
-
}
|
|
112
|
-
type Passkey = {
|
|
113
|
-
id: string;
|
|
114
|
-
name?: string | undefined;
|
|
115
|
-
publicKey: string;
|
|
116
|
-
userId: string;
|
|
117
|
-
credentialID: string;
|
|
118
|
-
counter: number;
|
|
119
|
-
deviceType: CredentialDeviceType;
|
|
120
|
-
backedUp: boolean;
|
|
121
|
-
transports?: string | undefined;
|
|
122
|
-
createdAt: Date;
|
|
123
|
-
aaguid?: string | undefined;
|
|
124
|
-
};
|
|
125
|
-
//#endregion
|
|
126
|
-
export { PasskeyOptions as n, WebAuthnChallengeValue as r, Passkey as t };
|
|
127
|
-
//# sourceMappingURL=types-BEqo908g.d.mts.map
|