@absolutejs/auth 0.53.7 → 0.53.8

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.
@@ -21,6 +21,7 @@ export type MfaConfig<UserType> = {
21
21
  challengeRoute?: RouteString;
22
22
  encryptionKey?: string;
23
23
  issuer?: string;
24
+ managementRoute?: RouteString;
24
25
  onMfaChallengeError?: (context: {
25
26
  error: unknown;
26
27
  userId?: string;
@@ -0,0 +1,106 @@
1
+ import { Elysia } from 'elysia';
2
+ import type { MfaRouteProps } from './config';
3
+ export type MfaStatus = {
4
+ backupCodesRemaining: number;
5
+ enabled: boolean;
6
+ smsBackup: {
7
+ enabled: boolean;
8
+ phone: string | null;
9
+ };
10
+ totp: {
11
+ enabled: boolean;
12
+ };
13
+ };
14
+ export declare const mfaManagementRoutes: <UserType>({ authSessionStore, getUserId, managementRoute, mfaStore }: MfaRouteProps<UserType>) => Elysia<"", {
15
+ decorator: {};
16
+ store: {
17
+ session: import("..").SessionRecord<UserType>;
18
+ unregisteredSession: import("..").UnregisteredSessionRecord;
19
+ };
20
+ derive: {};
21
+ resolve: {};
22
+ }, {
23
+ typebox: {};
24
+ error: {};
25
+ }, {
26
+ schema: {};
27
+ standaloneSchema: {};
28
+ macro: {};
29
+ macroFn: {};
30
+ parser: {};
31
+ response: {};
32
+ }, {
33
+ [x: string]: {
34
+ get: {
35
+ body: unknown;
36
+ params: {};
37
+ query: unknown;
38
+ headers: unknown;
39
+ response: {
40
+ 401: "Authentication required";
41
+ 200: {
42
+ backupCodesRemaining: number;
43
+ enabled: boolean;
44
+ smsBackup: {
45
+ enabled: boolean;
46
+ phone: string | null;
47
+ };
48
+ totp: {
49
+ enabled: boolean;
50
+ };
51
+ };
52
+ 422: {
53
+ type: "validation";
54
+ on: string;
55
+ summary?: string;
56
+ message?: string;
57
+ found?: unknown;
58
+ property?: string;
59
+ expected?: string;
60
+ };
61
+ };
62
+ };
63
+ };
64
+ } & {
65
+ [x: string]: {
66
+ delete: {
67
+ body: unknown;
68
+ params: {};
69
+ query: unknown;
70
+ headers: unknown;
71
+ response: {
72
+ 401: "Authentication required";
73
+ 200: {
74
+ readonly status: "disabled";
75
+ };
76
+ 422: {
77
+ type: "validation";
78
+ on: string;
79
+ summary?: string;
80
+ message?: string;
81
+ found?: unknown;
82
+ property?: string;
83
+ expected?: string;
84
+ };
85
+ };
86
+ };
87
+ };
88
+ }, {
89
+ derive: {};
90
+ resolve: {};
91
+ schema: {};
92
+ standaloneSchema: {};
93
+ response: {};
94
+ }, {
95
+ derive: {};
96
+ resolve: {};
97
+ schema: {};
98
+ standaloneSchema: {};
99
+ response: {};
100
+ } & {
101
+ derive: {};
102
+ resolve: {};
103
+ schema: {};
104
+ standaloneSchema: {};
105
+ response: {};
106
+ }>;
@@ -19,6 +19,62 @@ export declare const mfaRoutes: <UserType>(config: MfaRouteProps<UserType>) => E
19
19
  parser: {};
20
20
  response: {};
21
21
  }, {
22
+ [x: string]: {
23
+ get: {
24
+ body: unknown;
25
+ params: {};
26
+ query: unknown;
27
+ headers: unknown;
28
+ response: {
29
+ 401: "Authentication required";
30
+ 200: {
31
+ backupCodesRemaining: number;
32
+ enabled: boolean;
33
+ smsBackup: {
34
+ enabled: boolean;
35
+ phone: string | null;
36
+ };
37
+ totp: {
38
+ enabled: boolean;
39
+ };
40
+ };
41
+ 422: {
42
+ type: "validation";
43
+ on: string;
44
+ summary?: string;
45
+ message?: string;
46
+ found?: unknown;
47
+ property?: string;
48
+ expected?: string;
49
+ };
50
+ };
51
+ };
52
+ };
53
+ } & {
54
+ [x: string]: {
55
+ delete: {
56
+ body: unknown;
57
+ params: {};
58
+ query: unknown;
59
+ headers: unknown;
60
+ response: {
61
+ 401: "Authentication required";
62
+ 200: {
63
+ readonly status: "disabled";
64
+ };
65
+ 422: {
66
+ type: "validation";
67
+ on: string;
68
+ summary?: string;
69
+ message?: string;
70
+ found?: unknown;
71
+ property?: string;
72
+ expected?: string;
73
+ };
74
+ };
75
+ };
76
+ };
77
+ } & {
22
78
  [x: string]: {
23
79
  post: {
24
80
  body: unknown;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.53.7",
2
+ "version": "0.53.8",
3
3
  "name": "@absolutejs/auth",
4
4
  "description": "An authorization library for absolutejs",
5
5
  "repository": {