@robelest/convex-auth 0.0.4-preview.20 → 0.0.4-preview.21
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/{bin.cjs → bin.js} +331 -330
- package/dist/component/convex.config.d.ts +2 -2
- package/dist/component/convex.config.d.ts.map +1 -1
- package/dist/component/model.d.ts +5 -5
- package/dist/component/model.d.ts.map +1 -1
- package/dist/component/schema.d.ts +35 -35
- package/dist/component/server/runtime.d.ts +3 -3
- package/dist/server/http.d.ts +2 -2
- package/dist/server/http.d.ts.map +1 -1
- package/dist/server/mounts.d.ts +20 -20
- package/dist/server/mutations/account.d.ts +6 -6
- package/dist/server/mutations/account.d.ts.map +1 -1
- package/dist/server/mutations/code.d.ts +13 -13
- package/dist/server/mutations/invalidate.d.ts +4 -4
- package/dist/server/mutations/invalidate.d.ts.map +1 -1
- package/dist/server/mutations/oauth.d.ts +7 -7
- package/dist/server/mutations/oauth.d.ts.map +1 -1
- package/dist/server/mutations/refresh.d.ts +3 -3
- package/dist/server/mutations/register.d.ts +11 -11
- package/dist/server/mutations/retrieve.d.ts +6 -6
- package/dist/server/mutations/retrieve.d.ts.map +1 -1
- package/dist/server/mutations/signature.d.ts +4 -4
- package/dist/server/mutations/signature.d.ts.map +1 -1
- package/dist/server/mutations/signin.d.ts +5 -5
- package/dist/server/mutations/store.d.ts +97 -97
- package/dist/server/mutations/store.d.ts.map +1 -1
- package/dist/server/mutations/verify.d.ts +10 -10
- package/dist/server/mutations/verify.d.ts.map +1 -1
- package/dist/server/runtime.d.ts +14 -14
- package/package.json +3 -3
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Doc, MutationCtx, SessionInfo } from "../types.js";
|
|
2
2
|
import { Config, GetProviderOrThrowFunc } from "../crypto.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as convex_values20 from "convex/values";
|
|
4
4
|
import { Infer } from "convex/values";
|
|
5
5
|
|
|
6
6
|
//#region src/server/mutations/store.d.ts
|
|
7
|
-
declare const storeArgs:
|
|
7
|
+
declare const storeArgs: convex_values20.VObject<{
|
|
8
8
|
args: {
|
|
9
9
|
sessionId?: string | undefined;
|
|
10
|
-
type: "signIn";
|
|
11
10
|
userId: string;
|
|
11
|
+
type: "signIn";
|
|
12
12
|
generateTokens: boolean;
|
|
13
13
|
} | {
|
|
14
14
|
type: "signOut";
|
|
@@ -19,9 +19,9 @@ declare const storeArgs: convex_values15.VObject<{
|
|
|
19
19
|
provider?: string | undefined;
|
|
20
20
|
verifier?: string | undefined;
|
|
21
21
|
type: "verifyCodeAndSignIn";
|
|
22
|
-
params: any;
|
|
23
|
-
generateTokens: boolean;
|
|
24
22
|
allowExtraProviders: boolean;
|
|
23
|
+
generateTokens: boolean;
|
|
24
|
+
params: any;
|
|
25
25
|
} | {
|
|
26
26
|
type: "verifier";
|
|
27
27
|
} | {
|
|
@@ -37,23 +37,23 @@ declare const storeArgs: convex_values15.VObject<{
|
|
|
37
37
|
profile: any;
|
|
38
38
|
} | {
|
|
39
39
|
email?: string | undefined;
|
|
40
|
-
phone?: string | undefined;
|
|
41
40
|
accountId?: string | undefined;
|
|
41
|
+
phone?: string | undefined;
|
|
42
42
|
type: "createVerificationCode";
|
|
43
|
-
code: string;
|
|
44
43
|
provider: string;
|
|
45
|
-
|
|
44
|
+
code: string;
|
|
46
45
|
expirationTime: number;
|
|
46
|
+
allowExtraProviders: boolean;
|
|
47
47
|
} | {
|
|
48
48
|
shouldLinkViaEmail?: boolean | undefined;
|
|
49
49
|
shouldLinkViaPhone?: boolean | undefined;
|
|
50
50
|
type: "createAccountFromCredentials";
|
|
51
51
|
provider: string;
|
|
52
|
-
profile: any;
|
|
53
52
|
account: {
|
|
54
53
|
secret?: string | undefined;
|
|
55
54
|
id: string;
|
|
56
55
|
};
|
|
56
|
+
profile: any;
|
|
57
57
|
} | {
|
|
58
58
|
type: "retrieveAccountWithCredentials";
|
|
59
59
|
provider: string;
|
|
@@ -70,14 +70,14 @@ declare const storeArgs: convex_values15.VObject<{
|
|
|
70
70
|
};
|
|
71
71
|
} | {
|
|
72
72
|
except?: string[] | undefined;
|
|
73
|
-
type: "invalidateSessions";
|
|
74
73
|
userId: string;
|
|
74
|
+
type: "invalidateSessions";
|
|
75
75
|
};
|
|
76
76
|
}, {
|
|
77
|
-
args:
|
|
77
|
+
args: convex_values20.VUnion<{
|
|
78
78
|
sessionId?: string | undefined;
|
|
79
|
-
type: "signIn";
|
|
80
79
|
userId: string;
|
|
80
|
+
type: "signIn";
|
|
81
81
|
generateTokens: boolean;
|
|
82
82
|
} | {
|
|
83
83
|
type: "signOut";
|
|
@@ -88,9 +88,9 @@ declare const storeArgs: convex_values15.VObject<{
|
|
|
88
88
|
provider?: string | undefined;
|
|
89
89
|
verifier?: string | undefined;
|
|
90
90
|
type: "verifyCodeAndSignIn";
|
|
91
|
-
params: any;
|
|
92
|
-
generateTokens: boolean;
|
|
93
91
|
allowExtraProviders: boolean;
|
|
92
|
+
generateTokens: boolean;
|
|
93
|
+
params: any;
|
|
94
94
|
} | {
|
|
95
95
|
type: "verifier";
|
|
96
96
|
} | {
|
|
@@ -106,23 +106,23 @@ declare const storeArgs: convex_values15.VObject<{
|
|
|
106
106
|
profile: any;
|
|
107
107
|
} | {
|
|
108
108
|
email?: string | undefined;
|
|
109
|
-
phone?: string | undefined;
|
|
110
109
|
accountId?: string | undefined;
|
|
110
|
+
phone?: string | undefined;
|
|
111
111
|
type: "createVerificationCode";
|
|
112
|
-
code: string;
|
|
113
112
|
provider: string;
|
|
114
|
-
|
|
113
|
+
code: string;
|
|
115
114
|
expirationTime: number;
|
|
115
|
+
allowExtraProviders: boolean;
|
|
116
116
|
} | {
|
|
117
117
|
shouldLinkViaEmail?: boolean | undefined;
|
|
118
118
|
shouldLinkViaPhone?: boolean | undefined;
|
|
119
119
|
type: "createAccountFromCredentials";
|
|
120
120
|
provider: string;
|
|
121
|
-
profile: any;
|
|
122
121
|
account: {
|
|
123
122
|
secret?: string | undefined;
|
|
124
123
|
id: string;
|
|
125
124
|
};
|
|
125
|
+
profile: any;
|
|
126
126
|
} | {
|
|
127
127
|
type: "retrieveAccountWithCredentials";
|
|
128
128
|
provider: string;
|
|
@@ -139,55 +139,55 @@ declare const storeArgs: convex_values15.VObject<{
|
|
|
139
139
|
};
|
|
140
140
|
} | {
|
|
141
141
|
except?: string[] | undefined;
|
|
142
|
-
type: "invalidateSessions";
|
|
143
142
|
userId: string;
|
|
144
|
-
|
|
143
|
+
type: "invalidateSessions";
|
|
144
|
+
}, [convex_values20.VObject<{
|
|
145
145
|
sessionId?: string | undefined;
|
|
146
|
-
type: "signIn";
|
|
147
146
|
userId: string;
|
|
147
|
+
type: "signIn";
|
|
148
148
|
generateTokens: boolean;
|
|
149
149
|
}, {
|
|
150
|
-
userId:
|
|
151
|
-
sessionId:
|
|
152
|
-
generateTokens:
|
|
153
|
-
type:
|
|
154
|
-
}, "required", "
|
|
150
|
+
userId: convex_values20.VString<string, "required">;
|
|
151
|
+
sessionId: convex_values20.VString<string | undefined, "optional">;
|
|
152
|
+
generateTokens: convex_values20.VBoolean<boolean, "required">;
|
|
153
|
+
type: convex_values20.VLiteral<"signIn", "required">;
|
|
154
|
+
}, "required", "userId" | "type" | "sessionId" | "generateTokens">, convex_values20.VObject<{
|
|
155
155
|
type: "signOut";
|
|
156
156
|
}, {
|
|
157
|
-
type:
|
|
158
|
-
}, "required", "type">,
|
|
157
|
+
type: convex_values20.VLiteral<"signOut", "required">;
|
|
158
|
+
}, "required", "type">, convex_values20.VObject<{
|
|
159
159
|
type: "refreshSession";
|
|
160
160
|
refreshToken: string;
|
|
161
161
|
}, {
|
|
162
|
-
refreshToken:
|
|
163
|
-
type:
|
|
164
|
-
}, "required", "type" | "refreshToken">,
|
|
162
|
+
refreshToken: convex_values20.VString<string, "required">;
|
|
163
|
+
type: convex_values20.VLiteral<"refreshSession", "required">;
|
|
164
|
+
}, "required", "type" | "refreshToken">, convex_values20.VObject<{
|
|
165
165
|
provider?: string | undefined;
|
|
166
166
|
verifier?: string | undefined;
|
|
167
167
|
type: "verifyCodeAndSignIn";
|
|
168
|
-
params: any;
|
|
169
|
-
generateTokens: boolean;
|
|
170
168
|
allowExtraProviders: boolean;
|
|
169
|
+
generateTokens: boolean;
|
|
170
|
+
params: any;
|
|
171
171
|
}, {
|
|
172
|
-
params:
|
|
173
|
-
provider:
|
|
174
|
-
verifier:
|
|
175
|
-
generateTokens:
|
|
176
|
-
allowExtraProviders:
|
|
177
|
-
type:
|
|
178
|
-
}, "required", "type" | "provider" | "
|
|
172
|
+
params: convex_values20.VAny<any, "required", string>;
|
|
173
|
+
provider: convex_values20.VString<string | undefined, "optional">;
|
|
174
|
+
verifier: convex_values20.VString<string | undefined, "optional">;
|
|
175
|
+
generateTokens: convex_values20.VBoolean<boolean, "required">;
|
|
176
|
+
allowExtraProviders: convex_values20.VBoolean<boolean, "required">;
|
|
177
|
+
type: convex_values20.VLiteral<"verifyCodeAndSignIn", "required">;
|
|
178
|
+
}, "required", "type" | "provider" | "allowExtraProviders" | "generateTokens" | "params" | "verifier" | `params.${string}`>, convex_values20.VObject<{
|
|
179
179
|
type: "verifier";
|
|
180
180
|
}, {
|
|
181
|
-
type:
|
|
182
|
-
}, "required", "type">,
|
|
181
|
+
type: convex_values20.VLiteral<"verifier", "required">;
|
|
182
|
+
}, "required", "type">, convex_values20.VObject<{
|
|
183
183
|
type: "verifierSignature";
|
|
184
184
|
verifier: string;
|
|
185
185
|
signature: string;
|
|
186
186
|
}, {
|
|
187
|
-
verifier:
|
|
188
|
-
signature:
|
|
189
|
-
type:
|
|
190
|
-
}, "required", "type" | "verifier" | "signature">,
|
|
187
|
+
verifier: convex_values20.VString<string, "required">;
|
|
188
|
+
signature: convex_values20.VString<string, "required">;
|
|
189
|
+
type: convex_values20.VLiteral<"verifierSignature", "required">;
|
|
190
|
+
}, "required", "type" | "verifier" | "signature">, convex_values20.VObject<{
|
|
191
191
|
accountExtend?: any;
|
|
192
192
|
type: "userOAuth";
|
|
193
193
|
provider: string;
|
|
@@ -195,54 +195,54 @@ declare const storeArgs: convex_values15.VObject<{
|
|
|
195
195
|
providerAccountId: string;
|
|
196
196
|
profile: any;
|
|
197
197
|
}, {
|
|
198
|
-
provider:
|
|
199
|
-
providerAccountId:
|
|
200
|
-
profile:
|
|
201
|
-
signature:
|
|
202
|
-
accountExtend:
|
|
203
|
-
type:
|
|
204
|
-
}, "required", "type" | "provider" | "signature" | "providerAccountId" | "profile" | "accountExtend" | `profile.${string}` | `accountExtend.${string}`>,
|
|
198
|
+
provider: convex_values20.VString<string, "required">;
|
|
199
|
+
providerAccountId: convex_values20.VString<string, "required">;
|
|
200
|
+
profile: convex_values20.VAny<any, "required", string>;
|
|
201
|
+
signature: convex_values20.VString<string, "required">;
|
|
202
|
+
accountExtend: convex_values20.VAny<any, "optional", string>;
|
|
203
|
+
type: convex_values20.VLiteral<"userOAuth", "required">;
|
|
204
|
+
}, "required", "type" | "provider" | "signature" | "providerAccountId" | "profile" | "accountExtend" | `profile.${string}` | `accountExtend.${string}`>, convex_values20.VObject<{
|
|
205
205
|
email?: string | undefined;
|
|
206
|
-
phone?: string | undefined;
|
|
207
206
|
accountId?: string | undefined;
|
|
207
|
+
phone?: string | undefined;
|
|
208
208
|
type: "createVerificationCode";
|
|
209
|
-
code: string;
|
|
210
209
|
provider: string;
|
|
211
|
-
|
|
210
|
+
code: string;
|
|
212
211
|
expirationTime: number;
|
|
212
|
+
allowExtraProviders: boolean;
|
|
213
213
|
}, {
|
|
214
|
-
accountId:
|
|
215
|
-
provider:
|
|
216
|
-
email:
|
|
217
|
-
phone:
|
|
218
|
-
code:
|
|
219
|
-
expirationTime:
|
|
220
|
-
allowExtraProviders:
|
|
221
|
-
type:
|
|
222
|
-
}, "required", "email" | "
|
|
214
|
+
accountId: convex_values20.VString<string | undefined, "optional">;
|
|
215
|
+
provider: convex_values20.VString<string, "required">;
|
|
216
|
+
email: convex_values20.VString<string | undefined, "optional">;
|
|
217
|
+
phone: convex_values20.VString<string | undefined, "optional">;
|
|
218
|
+
code: convex_values20.VString<string, "required">;
|
|
219
|
+
expirationTime: convex_values20.VFloat64<number, "required">;
|
|
220
|
+
allowExtraProviders: convex_values20.VBoolean<boolean, "required">;
|
|
221
|
+
type: convex_values20.VLiteral<"createVerificationCode", "required">;
|
|
222
|
+
}, "required", "email" | "type" | "provider" | "code" | "accountId" | "phone" | "expirationTime" | "allowExtraProviders">, convex_values20.VObject<{
|
|
223
223
|
shouldLinkViaEmail?: boolean | undefined;
|
|
224
224
|
shouldLinkViaPhone?: boolean | undefined;
|
|
225
225
|
type: "createAccountFromCredentials";
|
|
226
226
|
provider: string;
|
|
227
|
-
profile: any;
|
|
228
227
|
account: {
|
|
229
228
|
secret?: string | undefined;
|
|
230
229
|
id: string;
|
|
231
230
|
};
|
|
231
|
+
profile: any;
|
|
232
232
|
}, {
|
|
233
|
-
provider:
|
|
234
|
-
account:
|
|
233
|
+
provider: convex_values20.VString<string, "required">;
|
|
234
|
+
account: convex_values20.VObject<{
|
|
235
235
|
secret?: string | undefined;
|
|
236
236
|
id: string;
|
|
237
237
|
}, {
|
|
238
|
-
id:
|
|
239
|
-
secret:
|
|
238
|
+
id: convex_values20.VString<string, "required">;
|
|
239
|
+
secret: convex_values20.VString<string | undefined, "optional">;
|
|
240
240
|
}, "required", "id" | "secret">;
|
|
241
|
-
profile:
|
|
242
|
-
shouldLinkViaEmail:
|
|
243
|
-
shouldLinkViaPhone:
|
|
244
|
-
type:
|
|
245
|
-
}, "required", "type" | "provider" | "
|
|
241
|
+
profile: convex_values20.VAny<any, "required", string>;
|
|
242
|
+
shouldLinkViaEmail: convex_values20.VBoolean<boolean | undefined, "optional">;
|
|
243
|
+
shouldLinkViaPhone: convex_values20.VBoolean<boolean | undefined, "optional">;
|
|
244
|
+
type: convex_values20.VLiteral<"createAccountFromCredentials", "required">;
|
|
245
|
+
}, "required", "type" | "provider" | "account" | "account.id" | "account.secret" | "profile" | `profile.${string}` | "shouldLinkViaEmail" | "shouldLinkViaPhone">, convex_values20.VObject<{
|
|
246
246
|
type: "retrieveAccountWithCredentials";
|
|
247
247
|
provider: string;
|
|
248
248
|
account: {
|
|
@@ -250,16 +250,16 @@ declare const storeArgs: convex_values15.VObject<{
|
|
|
250
250
|
id: string;
|
|
251
251
|
};
|
|
252
252
|
}, {
|
|
253
|
-
provider:
|
|
254
|
-
account:
|
|
253
|
+
provider: convex_values20.VString<string, "required">;
|
|
254
|
+
account: convex_values20.VObject<{
|
|
255
255
|
secret?: string | undefined;
|
|
256
256
|
id: string;
|
|
257
257
|
}, {
|
|
258
|
-
id:
|
|
259
|
-
secret:
|
|
258
|
+
id: convex_values20.VString<string, "required">;
|
|
259
|
+
secret: convex_values20.VString<string | undefined, "optional">;
|
|
260
260
|
}, "required", "id" | "secret">;
|
|
261
|
-
type:
|
|
262
|
-
}, "required", "type" | "provider" | "account" | "account.id" | "account.secret">,
|
|
261
|
+
type: convex_values20.VLiteral<"retrieveAccountWithCredentials", "required">;
|
|
262
|
+
}, "required", "type" | "provider" | "account" | "account.id" | "account.secret">, convex_values20.VObject<{
|
|
263
263
|
type: "modifyAccount";
|
|
264
264
|
provider: string;
|
|
265
265
|
account: {
|
|
@@ -267,31 +267,31 @@ declare const storeArgs: convex_values15.VObject<{
|
|
|
267
267
|
secret: string;
|
|
268
268
|
};
|
|
269
269
|
}, {
|
|
270
|
-
provider:
|
|
271
|
-
account:
|
|
270
|
+
provider: convex_values20.VString<string, "required">;
|
|
271
|
+
account: convex_values20.VObject<{
|
|
272
272
|
id: string;
|
|
273
273
|
secret: string;
|
|
274
274
|
}, {
|
|
275
|
-
id:
|
|
276
|
-
secret:
|
|
275
|
+
id: convex_values20.VString<string, "required">;
|
|
276
|
+
secret: convex_values20.VString<string, "required">;
|
|
277
277
|
}, "required", "id" | "secret">;
|
|
278
|
-
type:
|
|
279
|
-
}, "required", "type" | "provider" | "account" | "account.id" | "account.secret">,
|
|
278
|
+
type: convex_values20.VLiteral<"modifyAccount", "required">;
|
|
279
|
+
}, "required", "type" | "provider" | "account" | "account.id" | "account.secret">, convex_values20.VObject<{
|
|
280
280
|
except?: string[] | undefined;
|
|
281
|
-
type: "invalidateSessions";
|
|
282
281
|
userId: string;
|
|
282
|
+
type: "invalidateSessions";
|
|
283
283
|
}, {
|
|
284
|
-
userId:
|
|
285
|
-
except:
|
|
286
|
-
type:
|
|
287
|
-
}, "required", "
|
|
288
|
-
}, "required", "args" | "args.email" | "args.
|
|
289
|
-
declare const storeImpl: (ctx: MutationCtx, fnArgs: Infer<typeof storeArgs>, getProviderOrThrow: GetProviderOrThrowFunc, config: Config) => Promise<string | void | {
|
|
290
|
-
userId:
|
|
291
|
-
sessionId:
|
|
284
|
+
userId: convex_values20.VString<string, "required">;
|
|
285
|
+
except: convex_values20.VArray<string[] | undefined, convex_values20.VString<string, "required">, "optional">;
|
|
286
|
+
type: convex_values20.VLiteral<"invalidateSessions", "required">;
|
|
287
|
+
}, "required", "userId" | "except" | "type">], "required", "email" | "userId" | "except" | "type" | "provider" | "account" | "account.id" | "account.secret" | "code" | "accountId" | "phone" | "expirationTime" | "allowExtraProviders" | "sessionId" | "generateTokens" | "refreshToken" | "params" | "verifier" | `params.${string}` | "signature" | "providerAccountId" | "profile" | "accountExtend" | `profile.${string}` | `accountExtend.${string}` | "shouldLinkViaEmail" | "shouldLinkViaPhone">;
|
|
288
|
+
}, "required", "args" | "args.email" | "args.userId" | "args.except" | "args.type" | "args.provider" | "args.account" | "args.account.id" | "args.account.secret" | "args.code" | "args.accountId" | "args.phone" | "args.expirationTime" | "args.allowExtraProviders" | "args.sessionId" | "args.generateTokens" | "args.refreshToken" | "args.params" | "args.verifier" | `args.params.${string}` | "args.signature" | "args.providerAccountId" | "args.profile" | "args.accountExtend" | `args.profile.${string}` | `args.accountExtend.${string}` | "args.shouldLinkViaEmail" | "args.shouldLinkViaPhone">;
|
|
289
|
+
declare const storeImpl: (ctx: MutationCtx, fnArgs: Infer<typeof storeArgs>, getProviderOrThrow: GetProviderOrThrowFunc, config: Config) => Promise<string | void | SessionInfo | {
|
|
290
|
+
userId: convex_values20.GenericId<"User">;
|
|
291
|
+
sessionId: convex_values20.GenericId<"Session">;
|
|
292
292
|
} | (string & {
|
|
293
293
|
__tableName: "AuthVerifier";
|
|
294
|
-
}) |
|
|
294
|
+
}) | {
|
|
295
295
|
token: string;
|
|
296
296
|
refreshToken: string;
|
|
297
297
|
} | {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","names":[],"sources":["../../../src/server/mutations/store.ts"],"mappings":";;;;;;cAyBa,SAAA,kBAAS,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAiDpB,eAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,SAAA,GACX,GAAA,EAAK,WAAA,EACL,MAAA,EAAQ,KAAA,QAAa,SAAA,GACrB,kBAAA,EAAoB,sBAAA,EACpB,MAAA,EAAQ,MAAA,KAAe,OAAA;UAAA,eAAA,CAAA,SAAA"}
|
|
1
|
+
{"version":3,"file":"store.d.ts","names":[],"sources":["../../../src/server/mutations/store.ts"],"mappings":";;;;;;cAyBa,SAAA,kBAAS,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAiDpB,eAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAEW,SAAA,GACX,GAAA,EAAK,WAAA,EACL,MAAA,EAAQ,KAAA,QAAa,SAAA,GACrB,kBAAA,EAAoB,sBAAA,EACpB,MAAA,EAAQ,MAAA,KAAe,OAAA,iBAAA,WAAA;UAAA,eAAA,CAAA,SAAA"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { MutationCtx, SessionInfo } from "../types.js";
|
|
2
2
|
import { Config, GetProviderOrThrowFunc } from "../crypto.js";
|
|
3
3
|
import { GenericActionCtx, GenericDataModel } from "convex/server";
|
|
4
|
-
import * as
|
|
4
|
+
import * as convex_values95 from "convex/values";
|
|
5
5
|
import { Infer } from "convex/values";
|
|
6
6
|
|
|
7
7
|
//#region src/server/mutations/verify.d.ts
|
|
8
|
-
declare const verifyCodeAndSignInArgs:
|
|
8
|
+
declare const verifyCodeAndSignInArgs: convex_values95.VObject<{
|
|
9
9
|
provider?: string | undefined;
|
|
10
10
|
verifier?: string | undefined;
|
|
11
|
-
params: any;
|
|
12
|
-
generateTokens: boolean;
|
|
13
11
|
allowExtraProviders: boolean;
|
|
12
|
+
generateTokens: boolean;
|
|
13
|
+
params: any;
|
|
14
14
|
}, {
|
|
15
|
-
params:
|
|
16
|
-
provider:
|
|
17
|
-
verifier:
|
|
18
|
-
generateTokens:
|
|
19
|
-
allowExtraProviders:
|
|
20
|
-
}, "required", "provider" | "
|
|
15
|
+
params: convex_values95.VAny<any, "required", string>;
|
|
16
|
+
provider: convex_values95.VString<string | undefined, "optional">;
|
|
17
|
+
verifier: convex_values95.VString<string | undefined, "optional">;
|
|
18
|
+
generateTokens: convex_values95.VBoolean<boolean, "required">;
|
|
19
|
+
allowExtraProviders: convex_values95.VBoolean<boolean, "required">;
|
|
20
|
+
}, "required", "provider" | "allowExtraProviders" | "generateTokens" | "params" | "verifier" | `params.${string}`>;
|
|
21
21
|
type ReturnType = null | SessionInfo;
|
|
22
22
|
declare function verifyCodeAndSignInImpl(ctx: MutationCtx, args: Infer<typeof verifyCodeAndSignInArgs>, getProviderOrThrow: GetProviderOrThrowFunc, config: Config): Promise<ReturnType>;
|
|
23
23
|
declare const callVerifyCodeAndSignIn: <DataModel extends GenericDataModel>(ctx: GenericActionCtx<DataModel>, args: Infer<typeof verifyCodeAndSignInArgs>) => Promise<ReturnType>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","names":[],"sources":["../../../src/server/mutations/verify.ts"],"mappings":";;;;;;;cA0Ba,uBAAA,
|
|
1
|
+
{"version":3,"file":"verify.d.ts","names":[],"sources":["../../../src/server/mutations/verify.ts"],"mappings":";;;;;;;cA0Ba,uBAAA,kBAAuB,OAAA;;;;;;;UAMlC,eAAA,CAAA,IAAA;;;;;;KAEG,UAAA,UAAoB,WAAA;AAAA,iBAgBH,uBAAA,CACpB,GAAA,EAAK,WAAA,EACL,IAAA,EAAM,KAAA,QAAa,uBAAA,GACnB,kBAAA,EAAoB,sBAAA,EACpB,MAAA,EAAQ,MAAA,GACP,OAAA,CAAQ,UAAA;AAAA,cAsIE,uBAAA,qBACO,gBAAA,EAElB,GAAA,EAAK,gBAAA,CAAiB,SAAA,GACtB,IAAA,EAAM,KAAA,QAAa,uBAAA,MAClB,OAAA,CAAQ,UAAA"}
|
package/dist/server/runtime.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConvexAuthConfig, Doc, SessionInfo } from "./types.js";
|
|
2
2
|
import * as convex_server63 from "convex/server";
|
|
3
|
-
import * as
|
|
3
|
+
import * as convex_values114 from "convex/values";
|
|
4
4
|
|
|
5
5
|
//#region src/server/runtime.d.ts
|
|
6
6
|
/**
|
|
@@ -33,9 +33,9 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
33
33
|
*/
|
|
34
34
|
signIn: convex_server63.RegisteredAction<"public", {
|
|
35
35
|
provider?: string | undefined;
|
|
36
|
+
refreshToken?: string | undefined;
|
|
36
37
|
params?: any;
|
|
37
38
|
verifier?: string | undefined;
|
|
38
|
-
refreshToken?: string | undefined;
|
|
39
39
|
calledBy?: string | undefined;
|
|
40
40
|
}, Promise<SignInActionResult>>;
|
|
41
41
|
/**
|
|
@@ -49,8 +49,8 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
49
49
|
store: convex_server63.RegisteredMutation<"internal", {
|
|
50
50
|
args: {
|
|
51
51
|
sessionId?: string | undefined;
|
|
52
|
-
type: "signIn";
|
|
53
52
|
userId: string;
|
|
53
|
+
type: "signIn";
|
|
54
54
|
generateTokens: boolean;
|
|
55
55
|
} | {
|
|
56
56
|
type: "signOut";
|
|
@@ -61,9 +61,9 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
61
61
|
provider?: string | undefined;
|
|
62
62
|
verifier?: string | undefined;
|
|
63
63
|
type: "verifyCodeAndSignIn";
|
|
64
|
-
params: any;
|
|
65
|
-
generateTokens: boolean;
|
|
66
64
|
allowExtraProviders: boolean;
|
|
65
|
+
generateTokens: boolean;
|
|
66
|
+
params: any;
|
|
67
67
|
} | {
|
|
68
68
|
type: "verifier";
|
|
69
69
|
} | {
|
|
@@ -79,23 +79,23 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
79
79
|
profile: any;
|
|
80
80
|
} | {
|
|
81
81
|
email?: string | undefined;
|
|
82
|
-
phone?: string | undefined;
|
|
83
82
|
accountId?: string | undefined;
|
|
83
|
+
phone?: string | undefined;
|
|
84
84
|
type: "createVerificationCode";
|
|
85
|
-
code: string;
|
|
86
85
|
provider: string;
|
|
87
|
-
|
|
86
|
+
code: string;
|
|
88
87
|
expirationTime: number;
|
|
88
|
+
allowExtraProviders: boolean;
|
|
89
89
|
} | {
|
|
90
90
|
shouldLinkViaEmail?: boolean | undefined;
|
|
91
91
|
shouldLinkViaPhone?: boolean | undefined;
|
|
92
92
|
type: "createAccountFromCredentials";
|
|
93
93
|
provider: string;
|
|
94
|
-
profile: any;
|
|
95
94
|
account: {
|
|
96
95
|
secret?: string | undefined;
|
|
97
96
|
id: string;
|
|
98
97
|
};
|
|
98
|
+
profile: any;
|
|
99
99
|
} | {
|
|
100
100
|
type: "retrieveAccountWithCredentials";
|
|
101
101
|
provider: string;
|
|
@@ -112,15 +112,15 @@ declare function Auth(config_: ConvexAuthConfig): {
|
|
|
112
112
|
};
|
|
113
113
|
} | {
|
|
114
114
|
except?: string[] | undefined;
|
|
115
|
-
type: "invalidateSessions";
|
|
116
115
|
userId: string;
|
|
116
|
+
type: "invalidateSessions";
|
|
117
117
|
};
|
|
118
|
-
}, Promise<string | void | {
|
|
119
|
-
userId:
|
|
120
|
-
sessionId:
|
|
118
|
+
}, Promise<string | void | SessionInfo | {
|
|
119
|
+
userId: convex_values114.GenericId<"User">;
|
|
120
|
+
sessionId: convex_values114.GenericId<"Session">;
|
|
121
121
|
} | (string & {
|
|
122
122
|
__tableName: "AuthVerifier";
|
|
123
|
-
}) |
|
|
123
|
+
}) | {
|
|
124
124
|
token: string;
|
|
125
125
|
refreshToken: string;
|
|
126
126
|
} | {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robelest/convex-auth",
|
|
3
|
-
"version": "0.0.4-preview.
|
|
3
|
+
"version": "0.0.4-preview.21",
|
|
4
4
|
"description": "Authentication for Convex",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"auth",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "git+https://github.com/robelest/convex-auth.git"
|
|
20
20
|
},
|
|
21
|
-
"bin": "./dist/bin.
|
|
21
|
+
"bin": "./dist/bin.js",
|
|
22
22
|
"files": [
|
|
23
23
|
"dist",
|
|
24
24
|
"src"
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"fluent-convex": "^0.12.3",
|
|
80
80
|
"jose": "^6.1.3",
|
|
81
81
|
"jwt-decode": "^4.0.0",
|
|
82
|
-
"@robelest/samlify": "0.0.1-preview.
|
|
82
|
+
"@robelest/samlify": "0.0.1-preview.2"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@arethetypeswrong/cli": "^0.18.2",
|