@crossauth/sveltekit 0.0.37 → 0.0.38

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.
@@ -40,9 +40,15 @@ export interface SvelteKitSessionServerOptions extends SessionManagerOptions {
40
40
  /**
41
41
  * URL to call when login is required.
42
42
  *
43
- * Default "/"
43
+ * Default "/login"
44
44
  */
45
45
  loginUrl?: string;
46
+ /**
47
+ * URL to call to logout.
48
+ *
49
+ * Default "/logout"
50
+ */
51
+ logoutUrl?: string;
46
52
  /**
47
53
  * Default URL to go to after login (can be overridden by `next` POST param)
48
54
  *
@@ -52,21 +58,27 @@ export interface SvelteKitSessionServerOptions extends SessionManagerOptions {
52
58
  /**
53
59
  * URL to call when change password is required.
54
60
  *
55
- * Default "/changepassword"
61
+ * No default.
56
62
  */
57
63
  changePasswordUrl?: string;
58
64
  /**
59
65
  * URL to call when change password is required.
60
66
  *
61
- * Default "/resetpassword"
67
+ * No default.
62
68
  */
63
69
  requestPasswordResetUrl?: string;
64
70
  /**
65
71
  * URL to call when change factor2 is required.
66
72
  *
67
- * Default "/changefactor2"
73
+ * No default.
68
74
  */
69
75
  changeFactor2Url?: string;
76
+ /**
77
+ * URL to call when reconfiguring factor2 is required.
78
+ *
79
+ * No default.
80
+ */
81
+ configureFactor2Url?: string;
70
82
  /** OAuth to support. A comma-separated list from {@link @crossauth/common!OAuthFlows}.
71
83
  * If [`all`], there must be none other in the list.
72
84
  *
@@ -300,6 +312,7 @@ export declare class SvelteKitSessionServer implements SvelteKitSessionAdapter {
300
312
  event: RequestEvent;
301
313
  }) => MaybePromise<{
302
314
  headers: Header[];
315
+ status?: number;
303
316
  }>;
304
317
  readonly twoFAHook: (input: {
305
318
  event: RequestEvent;
@@ -412,6 +425,7 @@ export declare class SvelteKitSessionServer implements SvelteKitSessionAdapter {
412
425
  readonly enablePasswordReset = false;
413
426
  private factor2Url;
414
427
  private loginUrl;
428
+ private logoutUrl;
415
429
  /**
416
430
  * Use these to access the `load` and `action` endpoints for functions
417
431
  * provided by Crossauth. These are the ones intended for users to
@@ -290,8 +290,10 @@ export type UpdateUserReturn = {
290
290
  */
291
291
  export declare class SvelteKitUserEndpoints {
292
292
  private sessionServer;
293
- private changePasswordUrl;
294
- private changeFactor2Url;
293
+ readonly changePasswordUrl: string | undefined;
294
+ readonly changeFactor2Url: string | undefined;
295
+ readonly configureFactor2Url: string | undefined;
296
+ readonly requestPasswordResetUrl: string | undefined;
295
297
  private loginRedirectUrl;
296
298
  private loginUrl;
297
299
  private addToSession?;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossauth/sveltekit",
3
- "version": "0.0.37",
3
+ "version": "0.0.38",
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.37",
50
- "@crossauth/common": "^0.0.37"
49
+ "@crossauth/backend": "^0.0.38",
50
+ "@crossauth/common": "^0.0.38"
51
51
  },
52
52
  "scripts": {
53
53
  "preparex": "svelte-kit sync",