@crossauth/sveltekit 0.0.35 → 0.0.37

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.
@@ -88,7 +88,7 @@ export interface SvelteKitSessionServerOptions extends SessionManagerOptions {
88
88
  */
89
89
  createUserFn?: (event: RequestEvent, data: {
90
90
  [key: string]: string | undefined;
91
- }, userEditableFields: string[]) => UserInputFields;
91
+ }, userEditableFields: string[], allowableFactor1: string[]) => UserInputFields;
92
92
  /** Function that updates a user from form fields.
93
93
  * Default one takes fields that begin with `user_`, removing the `user_`
94
94
  * prefix and filtering out anything not in the userEditableFields list in
@@ -264,6 +264,16 @@ export interface SvelteKitSessionServerOptions extends SessionManagerOptions {
264
264
  redirect?: any;
265
265
  /** Pass the Sveltekit error function */
266
266
  error?: any;
267
+ /**
268
+ * When signing up themselves, users may choose any of these.
269
+ * Default: ["localpassword"]
270
+ */
271
+ userAllowedFactor1?: string[];
272
+ /**
273
+ * When admins create a user, they may choose any of these.
274
+ * Default: ["localpassword"]
275
+ */
276
+ adminAllowedFactor1?: string[];
267
277
  }
268
278
  /**
269
279
  * The Sveltekit session server.
@@ -331,7 +341,7 @@ export declare class SvelteKitSessionServer implements SvelteKitSessionAdapter {
331
341
  */
332
342
  createUserFn: (event: RequestEvent, data: {
333
343
  [key: string]: string | undefined;
334
- }, userEditableFields: string[]) => UserInputFields;
344
+ }, userEditableFields: string[], allowableFactor1: string[]) => UserInputFields;
335
345
  /**
336
346
  * Funtion to update a user record from form fields. Taken from the options during
337
347
  * construction or the default value.
@@ -444,6 +454,8 @@ export declare class SvelteKitSessionServer implements SvelteKitSessionAdapter {
444
454
  * See {@link SvelteKitServerOptions}.
445
455
  */
446
456
  readonly editUserScope?: string;
457
+ readonly userAllowedFactor1: string[];
458
+ readonly adminAllowedFactor1: string[];
447
459
  /**
448
460
  * Constructor
449
461
  * @param keyStorage where session IDs, email verification and reset tokens are stored
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossauth/sveltekit",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "license": "Apache-2.0",
5
5
  "private": false,
6
6
  "type": "module",
@@ -46,8 +46,8 @@
46
46
  "minimatch": "^10.0.1",
47
47
  "qrcode": "^1.5.4",
48
48
  "vite-plugin-dts": "^3.6.4",
49
- "@crossauth/backend": "^0.0.35",
50
- "@crossauth/common": "^0.0.35"
49
+ "@crossauth/backend": "^0.0.37",
50
+ "@crossauth/common": "^0.0.37"
51
51
  },
52
52
  "scripts": {
53
53
  "preparex": "svelte-kit sync",