mailsentry-auth 0.2.6 → 0.2.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.
- package/dist/index.d.mts +34 -24
- package/dist/index.d.ts +34 -24
- package/dist/index.js +147 -110
- package/dist/index.mjs +148 -111
- package/dist/middleware.d.mts +2 -5
- package/dist/middleware.mjs +139 -77
- package/dist/utils/cookie-utils.js +51 -33
- package/dist/utils/cookie-utils.mjs +51 -33
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -91,11 +91,11 @@ var AuthEventType = /* @__PURE__ */ ((AuthEventType3) => {
|
|
|
91
91
|
AuthEventType3["SignInRequiredModal"] = "auth.signin_required_modal";
|
|
92
92
|
return AuthEventType3;
|
|
93
93
|
})(AuthEventType || {});
|
|
94
|
-
var PageType = /* @__PURE__ */ ((
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
return
|
|
94
|
+
var PageType = /* @__PURE__ */ ((PageType3) => {
|
|
95
|
+
PageType3["LOGIN"] = "/login";
|
|
96
|
+
PageType3["DASHBOARD"] = "dashboard";
|
|
97
|
+
PageType3["HOME"] = "/";
|
|
98
|
+
return PageType3;
|
|
99
99
|
})(PageType || {});
|
|
100
100
|
var NavigationAction = /* @__PURE__ */ ((NavigationAction2) => {
|
|
101
101
|
NavigationAction2["NONE"] = "none";
|
|
@@ -803,8 +803,8 @@ var useAuthActionHandler = () => {
|
|
|
803
803
|
const clearAll = _react.useCallback.call(void 0, () => {
|
|
804
804
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { error: null, success: null }));
|
|
805
805
|
}, []);
|
|
806
|
-
const setSuccess = _react.useCallback.call(void 0, (
|
|
807
|
-
setState((prev) => __spreadProps(__spreadValues({}, prev), { success:
|
|
806
|
+
const setSuccess = _react.useCallback.call(void 0, (message2) => {
|
|
807
|
+
setState((prev) => __spreadProps(__spreadValues({}, prev), { success: message2, error: null }));
|
|
808
808
|
}, []);
|
|
809
809
|
const setError = _react.useCallback.call(void 0, (error) => {
|
|
810
810
|
setState((prev) => __spreadProps(__spreadValues({}, prev), { error, success: null }));
|
|
@@ -1105,18 +1105,54 @@ function init(converter, defaultAttributes) {
|
|
|
1105
1105
|
var api = init(defaultConverter, { path: "/" });
|
|
1106
1106
|
|
|
1107
1107
|
// src/config/middleware.ts
|
|
1108
|
-
var
|
|
1109
|
-
// Route Protection Configuration
|
|
1110
|
-
// PATTERNS_TO_PROTECT: Routes that require authentication (whitelist approach recommended for security)
|
|
1111
|
-
// PATTERNS_TO_EXCLUDE: Routes to explicitly exclude from protection (e.g., login page, public assets)
|
|
1108
|
+
var MiddlewareConfig = class {
|
|
1112
1109
|
/**
|
|
1113
|
-
* Get
|
|
1114
|
-
*
|
|
1110
|
+
* Get dynamic protection rules from environment variable
|
|
1111
|
+
* Format: "host:path" or "path"
|
|
1115
1112
|
*/
|
|
1116
|
-
static
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1113
|
+
static getProtectedRules() {
|
|
1114
|
+
return this.parseRules(process.env.NEXT_PUBLIC_PROTECTED_ROUTES, [
|
|
1115
|
+
{ hostPattern: this.CONSTANTS.DASHBOARD_SUBDOMAIN, pathPattern: "*" }
|
|
1116
|
+
]);
|
|
1117
|
+
}
|
|
1118
|
+
/**
|
|
1119
|
+
* Get public routes whitelist (Exclusions)
|
|
1120
|
+
* Format: "host:path" or "path"
|
|
1121
|
+
*/
|
|
1122
|
+
static getWhitelistRules() {
|
|
1123
|
+
return this.parseRules(process.env.NEXT_PUBLIC_AUTH_WHITELIST_ROUTES, [
|
|
1124
|
+
{ hostPattern: null, pathPattern: this.CONSTANTS.LOGIN_PATH }
|
|
1125
|
+
]);
|
|
1126
|
+
}
|
|
1127
|
+
/**
|
|
1128
|
+
* Get guest-only routes (redirects authenticated users away)
|
|
1129
|
+
* Format: "host:path" or "path"
|
|
1130
|
+
*/
|
|
1131
|
+
static getGuestOnlyRules() {
|
|
1132
|
+
return this.parseRules(process.env.NEXT_PUBLIC_GUEST_ONLY_ROUTES, [
|
|
1133
|
+
{ hostPattern: null, pathPattern: this.CONSTANTS.LOGIN_PATH }
|
|
1134
|
+
]);
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Generic parser for environment variables containing rule lists
|
|
1138
|
+
*/
|
|
1139
|
+
static parseRules(envVar, defaults) {
|
|
1140
|
+
if (envVar === void 0) return defaults;
|
|
1141
|
+
return envVar.split(",").map((rule) => this.parseSingleRule(rule)).filter((r) => r.pathPattern.length > 0);
|
|
1142
|
+
}
|
|
1143
|
+
/**
|
|
1144
|
+
* Parse a single rule string into a ProtectionRule object
|
|
1145
|
+
*/
|
|
1146
|
+
static parseSingleRule(ruleString) {
|
|
1147
|
+
const trimmed = ruleString.trim();
|
|
1148
|
+
const separatorIndex = trimmed.indexOf(":");
|
|
1149
|
+
if (separatorIndex === -1) {
|
|
1150
|
+
return { hostPattern: null, pathPattern: trimmed };
|
|
1151
|
+
}
|
|
1152
|
+
return {
|
|
1153
|
+
hostPattern: trimmed.substring(0, separatorIndex).trim(),
|
|
1154
|
+
pathPattern: trimmed.substring(separatorIndex + 1).trim()
|
|
1155
|
+
};
|
|
1120
1156
|
}
|
|
1121
1157
|
/**
|
|
1122
1158
|
* Get the base domain from environment or use default
|
|
@@ -1132,41 +1168,23 @@ var _MiddlewareConfig = class _MiddlewareConfig {
|
|
|
1132
1168
|
}
|
|
1133
1169
|
};
|
|
1134
1170
|
// Common constants
|
|
1135
|
-
|
|
1171
|
+
MiddlewareConfig.CONSTANTS = {
|
|
1136
1172
|
LOGIN_PATH: "/login",
|
|
1137
|
-
DASHBOARD_SUBDOMAIN: "dashboard"
|
|
1138
|
-
PUBLIC_PATH: "/public",
|
|
1139
|
-
PUBLIC_API_PATH: "/api/public"
|
|
1140
|
-
};
|
|
1141
|
-
_MiddlewareConfig.PROTECTED_ROUTES = {
|
|
1142
|
-
// Routes that MUST be protected
|
|
1143
|
-
INCLUDE: [
|
|
1144
|
-
"/"
|
|
1145
|
-
// Protect everything by default (since dashboard.cutly.io/ is the root)
|
|
1146
|
-
],
|
|
1147
|
-
// Routes that should NEVER be protected (public)
|
|
1148
|
-
EXCLUDE: [
|
|
1149
|
-
_MiddlewareConfig.CONSTANTS.LOGIN_PATH,
|
|
1150
|
-
_MiddlewareConfig.CONSTANTS.PUBLIC_PATH,
|
|
1151
|
-
_MiddlewareConfig.CONSTANTS.PUBLIC_API_PATH,
|
|
1152
|
-
..._MiddlewareConfig.getPublicRoutesWhitelist()
|
|
1153
|
-
// Add custom whitelist from env
|
|
1154
|
-
]
|
|
1173
|
+
DASHBOARD_SUBDOMAIN: "dashboard"
|
|
1155
1174
|
};
|
|
1156
1175
|
// HTTP methods to process
|
|
1157
|
-
|
|
1176
|
+
MiddlewareConfig.ALLOWED_METHODS = ["GET", "HEAD"];
|
|
1158
1177
|
// Query parameters
|
|
1159
|
-
|
|
1178
|
+
MiddlewareConfig.QUERY_PARAMS = {
|
|
1160
1179
|
LOGIN_REQUIRED: "sign_in_required",
|
|
1161
1180
|
AUTH_CHECKED: "auth_checked",
|
|
1162
1181
|
REDIRECT_URL: "redirect_url"
|
|
1163
1182
|
};
|
|
1164
1183
|
// Query parameter values
|
|
1165
|
-
|
|
1184
|
+
MiddlewareConfig.QUERY_VALUES = {
|
|
1166
1185
|
LOGIN_REQUIRED: "true",
|
|
1167
1186
|
AUTH_CHECKED: "1"
|
|
1168
1187
|
};
|
|
1169
|
-
var MiddlewareConfig = _MiddlewareConfig;
|
|
1170
1188
|
var middlewareMatcher = [
|
|
1171
1189
|
"/((?!api|_next/static|_next/image|_next/webpack-hmr|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp|ico|css|js)$).*)"
|
|
1172
1190
|
];
|
|
@@ -1810,6 +1828,33 @@ var TokenManager = class {
|
|
|
1810
1828
|
}
|
|
1811
1829
|
};
|
|
1812
1830
|
|
|
1831
|
+
// src/services/api/api-error-mapper.ts
|
|
1832
|
+
var API_ERROR_CODES = {
|
|
1833
|
+
// Auth Errors
|
|
1834
|
+
5207: "The password you entered is incorrect. Please try again.",
|
|
1835
|
+
5070: "Password must be strong. Please use a stronger password."
|
|
1836
|
+
};
|
|
1837
|
+
function getErrorMessage(code, defaultMessage = "An unexpected error occurred") {
|
|
1838
|
+
const numericCode = Number(code);
|
|
1839
|
+
return API_ERROR_CODES[numericCode] || defaultMessage;
|
|
1840
|
+
}
|
|
1841
|
+
function parseNestedApiError(data) {
|
|
1842
|
+
if (!data || typeof data !== "object") {
|
|
1843
|
+
return null;
|
|
1844
|
+
}
|
|
1845
|
+
const errorData = data;
|
|
1846
|
+
if (errorData.message && typeof errorData.message === "object" && "statusCode" in errorData.message) {
|
|
1847
|
+
const customCode = errorData.message.statusCode;
|
|
1848
|
+
const technicalMessage = errorData.message.message;
|
|
1849
|
+
return {
|
|
1850
|
+
code: customCode,
|
|
1851
|
+
message: getErrorMessage(customCode, technicalMessage),
|
|
1852
|
+
originalError: errorData
|
|
1853
|
+
};
|
|
1854
|
+
}
|
|
1855
|
+
return null;
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1813
1858
|
// src/services/api/base-service.ts
|
|
1814
1859
|
var HttpClient = class {
|
|
1815
1860
|
constructor(config2) {
|
|
@@ -1880,12 +1925,13 @@ var HttpClient = class {
|
|
|
1880
1925
|
}
|
|
1881
1926
|
};
|
|
1882
1927
|
var ApiError = class extends Error {
|
|
1883
|
-
constructor(
|
|
1884
|
-
super(
|
|
1885
|
-
this.
|
|
1928
|
+
constructor(message2, status, statusText, apiError) {
|
|
1929
|
+
super(message2);
|
|
1930
|
+
this.message = message2;
|
|
1886
1931
|
this.status = status;
|
|
1887
1932
|
this.statusText = statusText;
|
|
1888
1933
|
this.apiError = apiError;
|
|
1934
|
+
this.name = "ApiError";
|
|
1889
1935
|
}
|
|
1890
1936
|
};
|
|
1891
1937
|
var BaseService = class {
|
|
@@ -1929,16 +1975,21 @@ var BaseService = class {
|
|
|
1929
1975
|
*/
|
|
1930
1976
|
createApiErrorFromResponse(response) {
|
|
1931
1977
|
const parsedError = this.tryParseApiErrorResponse(response.data);
|
|
1932
|
-
|
|
1933
|
-
return parsedError;
|
|
1934
|
-
}
|
|
1935
|
-
return this.createGenericApiError(response);
|
|
1978
|
+
return parsedError || this.createGenericApiError(response);
|
|
1936
1979
|
}
|
|
1937
1980
|
/**
|
|
1938
1981
|
* Try to parse API error response from response data
|
|
1939
1982
|
*/
|
|
1940
1983
|
tryParseApiErrorResponse(data) {
|
|
1941
1984
|
try {
|
|
1985
|
+
const nestedError = parseNestedApiError(data);
|
|
1986
|
+
if (nestedError) {
|
|
1987
|
+
return {
|
|
1988
|
+
message: nestedError.message,
|
|
1989
|
+
error: "ApiError",
|
|
1990
|
+
statusCode: nestedError.code
|
|
1991
|
+
};
|
|
1992
|
+
}
|
|
1942
1993
|
const responseData = data;
|
|
1943
1994
|
if (this.isValidApiErrorResponse(responseData)) {
|
|
1944
1995
|
return __spreadValues({
|
|
@@ -1969,62 +2020,46 @@ var BaseService = class {
|
|
|
1969
2020
|
};
|
|
1970
2021
|
}
|
|
1971
2022
|
/**
|
|
1972
|
-
*
|
|
2023
|
+
* Helper method for common request logic
|
|
1973
2024
|
*/
|
|
1974
|
-
async
|
|
2025
|
+
async executeRequest(method, endpoint, body, headers) {
|
|
1975
2026
|
const response = await this.httpClient.request(endpoint, {
|
|
1976
|
-
method
|
|
2027
|
+
method,
|
|
1977
2028
|
url: endpoint,
|
|
1978
|
-
headers
|
|
2029
|
+
headers,
|
|
2030
|
+
body
|
|
1979
2031
|
});
|
|
1980
2032
|
return this.handleResponse(response);
|
|
1981
2033
|
}
|
|
2034
|
+
/**
|
|
2035
|
+
* GET request
|
|
2036
|
+
*/
|
|
2037
|
+
async get(endpoint, headers) {
|
|
2038
|
+
return this.executeRequest("GET" /* GET */, endpoint, void 0, headers);
|
|
2039
|
+
}
|
|
1982
2040
|
/**
|
|
1983
2041
|
* POST request
|
|
1984
2042
|
*/
|
|
1985
2043
|
async post(endpoint, body, headers) {
|
|
1986
|
-
|
|
1987
|
-
method: "POST" /* POST */,
|
|
1988
|
-
url: endpoint,
|
|
1989
|
-
headers,
|
|
1990
|
-
body
|
|
1991
|
-
});
|
|
1992
|
-
return this.handleResponse(response);
|
|
2044
|
+
return this.executeRequest("POST" /* POST */, endpoint, body, headers);
|
|
1993
2045
|
}
|
|
1994
2046
|
/**
|
|
1995
2047
|
* PUT request
|
|
1996
2048
|
*/
|
|
1997
2049
|
async put(endpoint, body, headers) {
|
|
1998
|
-
|
|
1999
|
-
method: "PUT" /* PUT */,
|
|
2000
|
-
url: endpoint,
|
|
2001
|
-
headers,
|
|
2002
|
-
body
|
|
2003
|
-
});
|
|
2004
|
-
return this.handleResponse(response);
|
|
2050
|
+
return this.executeRequest("PUT" /* PUT */, endpoint, body, headers);
|
|
2005
2051
|
}
|
|
2006
2052
|
/**
|
|
2007
2053
|
* DELETE request
|
|
2008
2054
|
*/
|
|
2009
2055
|
async delete(endpoint, headers) {
|
|
2010
|
-
|
|
2011
|
-
method: "DELETE" /* DELETE */,
|
|
2012
|
-
url: endpoint,
|
|
2013
|
-
headers
|
|
2014
|
-
});
|
|
2015
|
-
return this.handleResponse(response);
|
|
2056
|
+
return this.executeRequest("DELETE" /* DELETE */, endpoint, void 0, headers);
|
|
2016
2057
|
}
|
|
2017
2058
|
/**
|
|
2018
2059
|
* PATCH request
|
|
2019
2060
|
*/
|
|
2020
2061
|
async patch(endpoint, body, headers) {
|
|
2021
|
-
|
|
2022
|
-
method: "PATCH" /* PATCH */,
|
|
2023
|
-
url: endpoint,
|
|
2024
|
-
headers,
|
|
2025
|
-
body
|
|
2026
|
-
});
|
|
2027
|
-
return this.handleResponse(response);
|
|
2062
|
+
return this.executeRequest("PATCH" /* PATCH */, endpoint, body, headers);
|
|
2028
2063
|
}
|
|
2029
2064
|
};
|
|
2030
2065
|
|
|
@@ -2185,14 +2220,14 @@ var AuthResultFactory = class {
|
|
|
2185
2220
|
|
|
2186
2221
|
// src/services/auth/patterns/logger/development-logger.ts
|
|
2187
2222
|
var DevelopmentLogger = class {
|
|
2188
|
-
log(
|
|
2189
|
-
console.log(
|
|
2223
|
+
log(message2, data) {
|
|
2224
|
+
console.log(message2, data);
|
|
2190
2225
|
}
|
|
2191
|
-
warn(
|
|
2192
|
-
console.warn(
|
|
2226
|
+
warn(message2, data) {
|
|
2227
|
+
console.warn(message2, data);
|
|
2193
2228
|
}
|
|
2194
|
-
error(
|
|
2195
|
-
console.error(
|
|
2229
|
+
error(message2, data) {
|
|
2230
|
+
console.error(message2, data);
|
|
2196
2231
|
}
|
|
2197
2232
|
};
|
|
2198
2233
|
|
|
@@ -2427,14 +2462,19 @@ var BaseErrorHandler = class {
|
|
|
2427
2462
|
}
|
|
2428
2463
|
};
|
|
2429
2464
|
|
|
2430
|
-
// src/services/auth/patterns/chain/
|
|
2431
|
-
var
|
|
2465
|
+
// src/services/auth/patterns/chain/api-error-handler.ts
|
|
2466
|
+
var ApiErrorHandler = class extends BaseErrorHandler {
|
|
2432
2467
|
canHandle(error) {
|
|
2433
|
-
return error instanceof
|
|
2468
|
+
return error instanceof ApiError;
|
|
2434
2469
|
}
|
|
2435
2470
|
handleError(error, context) {
|
|
2436
|
-
|
|
2437
|
-
|
|
2471
|
+
const apiError = error;
|
|
2472
|
+
console.error(`${context} API error:`, {
|
|
2473
|
+
message: apiError.message,
|
|
2474
|
+
status: apiError.status,
|
|
2475
|
+
code: apiError.apiError.statusCode
|
|
2476
|
+
});
|
|
2477
|
+
return AuthResultFactory.createFailure(apiError.message);
|
|
2438
2478
|
}
|
|
2439
2479
|
};
|
|
2440
2480
|
|
|
@@ -2449,17 +2489,6 @@ var NetworkErrorHandler = class extends BaseErrorHandler {
|
|
|
2449
2489
|
}
|
|
2450
2490
|
};
|
|
2451
2491
|
|
|
2452
|
-
// src/services/auth/patterns/chain/generic-error-handler.ts
|
|
2453
|
-
var GenericErrorHandler = class extends BaseErrorHandler {
|
|
2454
|
-
canHandle() {
|
|
2455
|
-
return true;
|
|
2456
|
-
}
|
|
2457
|
-
handleError(error, context) {
|
|
2458
|
-
console.error(`${context} error:`, error);
|
|
2459
|
-
return AuthResultFactory.createFailure(error);
|
|
2460
|
-
}
|
|
2461
|
-
};
|
|
2462
|
-
|
|
2463
2492
|
// src/services/auth/auth-orchestrator.ts
|
|
2464
2493
|
var AuthOrchestrator = class {
|
|
2465
2494
|
constructor(authService, tokenManager) {
|
|
@@ -2474,11 +2503,10 @@ var AuthOrchestrator = class {
|
|
|
2474
2503
|
* Setup Chain of Responsibility for error handling
|
|
2475
2504
|
*/
|
|
2476
2505
|
setupErrorHandlerChain() {
|
|
2477
|
-
const
|
|
2506
|
+
const apiHandler = new ApiErrorHandler();
|
|
2478
2507
|
const networkHandler = new NetworkErrorHandler();
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
return validationHandler;
|
|
2508
|
+
apiHandler.setNext(networkHandler);
|
|
2509
|
+
return apiHandler;
|
|
2482
2510
|
}
|
|
2483
2511
|
/**
|
|
2484
2512
|
* Validate that cookies are supported in the current environment
|
|
@@ -2587,7 +2615,7 @@ var AuthOrchestrator = class {
|
|
|
2587
2615
|
if (isVerified) {
|
|
2588
2616
|
return AuthResultFactory.createSuccess({ isVerified: true });
|
|
2589
2617
|
}
|
|
2590
|
-
return AuthResultFactory.createFailure("
|
|
2618
|
+
return AuthResultFactory.createFailure("Your verification code is wrong");
|
|
2591
2619
|
} catch (error) {
|
|
2592
2620
|
return this.errorHandler.handle(error, "Email verification");
|
|
2593
2621
|
}
|
|
@@ -3001,9 +3029,6 @@ var userSelectors = {
|
|
|
3001
3029
|
// src/middlewares/handlers/base-middleware-handler.ts
|
|
3002
3030
|
var _server = require('next/server');
|
|
3003
3031
|
|
|
3004
|
-
// src/middlewares/handlers/middleware-chain.ts
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
3032
|
// src/middlewares/utils/email-validator.ts
|
|
3008
3033
|
var isPublicUserEmail = (email) => {
|
|
3009
3034
|
if (!email || typeof email !== "string") return false;
|
|
@@ -3020,6 +3045,12 @@ var isPublicUserEmail = (email) => {
|
|
|
3020
3045
|
return true;
|
|
3021
3046
|
};
|
|
3022
3047
|
|
|
3048
|
+
// src/middlewares/handlers/authentication-handler.ts
|
|
3049
|
+
|
|
3050
|
+
|
|
3051
|
+
// src/middlewares/handlers/middleware-chain.ts
|
|
3052
|
+
|
|
3053
|
+
|
|
3023
3054
|
// src/hooks/use-user.ts
|
|
3024
3055
|
var useUser = () => {
|
|
3025
3056
|
const userState = userSelectors.useUserState();
|
|
@@ -3250,6 +3281,7 @@ function AuthFlowContainer({
|
|
|
3250
3281
|
stepperActions.goToStep(nextStep);
|
|
3251
3282
|
},
|
|
3252
3283
|
onError: (error) => {
|
|
3284
|
+
_antd.message.error(error);
|
|
3253
3285
|
console.error(error);
|
|
3254
3286
|
}
|
|
3255
3287
|
}
|
|
@@ -3289,6 +3321,7 @@ function AuthFlowContainer({
|
|
|
3289
3321
|
(_a = actionPipeline.find((action) => action.condition())) == null ? void 0 : _a.execute();
|
|
3290
3322
|
},
|
|
3291
3323
|
onError: (error) => {
|
|
3324
|
+
_antd.message.error(error);
|
|
3292
3325
|
console.error(error);
|
|
3293
3326
|
}
|
|
3294
3327
|
}
|
|
@@ -3306,6 +3339,7 @@ function AuthFlowContainer({
|
|
|
3306
3339
|
setPassword("");
|
|
3307
3340
|
},
|
|
3308
3341
|
onError: (error) => {
|
|
3342
|
+
_antd.message.error(error);
|
|
3309
3343
|
console.error(error);
|
|
3310
3344
|
}
|
|
3311
3345
|
}
|
|
@@ -3324,6 +3358,7 @@ function AuthFlowContainer({
|
|
|
3324
3358
|
handleSuccess();
|
|
3325
3359
|
},
|
|
3326
3360
|
onError: (error) => {
|
|
3361
|
+
_antd.message.error(error);
|
|
3327
3362
|
console.error(error);
|
|
3328
3363
|
}
|
|
3329
3364
|
}
|
|
@@ -3341,6 +3376,7 @@ function AuthFlowContainer({
|
|
|
3341
3376
|
handleSuccess();
|
|
3342
3377
|
},
|
|
3343
3378
|
onError: (error) => {
|
|
3379
|
+
_antd.message.error(error);
|
|
3344
3380
|
console.error(error);
|
|
3345
3381
|
}
|
|
3346
3382
|
}
|
|
@@ -3355,6 +3391,7 @@ function AuthFlowContainer({
|
|
|
3355
3391
|
onSuccess: () => {
|
|
3356
3392
|
},
|
|
3357
3393
|
onError: (error) => {
|
|
3394
|
+
_antd.message.error(error);
|
|
3358
3395
|
console.error(error);
|
|
3359
3396
|
}
|
|
3360
3397
|
}
|
|
@@ -3392,6 +3429,7 @@ function AuthFlowContainer({
|
|
|
3392
3429
|
onSuccess: () => {
|
|
3393
3430
|
},
|
|
3394
3431
|
onError: (error) => {
|
|
3432
|
+
_antd.message.error(error);
|
|
3395
3433
|
console.error(error);
|
|
3396
3434
|
}
|
|
3397
3435
|
}
|
|
@@ -3918,8 +3956,7 @@ var getForgotPasswordField = (options = {}) => ({
|
|
|
3918
3956
|
|
|
3919
3957
|
|
|
3920
3958
|
|
|
3921
|
-
|
|
3922
|
-
exports.AUTH_ENDPOINTS = AUTH_ENDPOINTS; exports.AlertDisplay = AlertDisplay; exports.AuthEventType = AuthEventType; exports.AuthFlowContainer = AuthFlowContainer; exports.AuthFlowModal = AuthFlowModal; exports.AuthFlowStep = AuthFlowStep; exports.AuthFlowVariant = AuthFlowVariant; exports.AuthInitializer = AuthInitializer; exports.AuthOrchestrator = AuthOrchestrator; exports.AuthOrchestratorFactory = AuthOrchestratorFactory; exports.AuthResultFactory = AuthResultFactory; exports.AuthService = AuthService; exports.AuthenticatedState = AuthenticatedState; exports.AuthenticationStatusContext = AuthenticationStatusContext; exports.BaseErrorHandler = BaseErrorHandler; exports.BaseEventBus = BaseEventBus; exports.BaseForm = BaseForm; exports.BaseService = BaseService; exports.BroadcastChannelEventBus = BroadcastChannelEventBus; exports.Channel = Channel; exports.CookieUtils = CookieUtils; exports.CrossTabBehaviorConfig = CrossTabBehaviorConfig; exports.CrossTabBehaviorHandler = CrossTabBehaviorHandler; exports.CrossTabDemo = CrossTabDemo; exports.DevelopmentLogger = DevelopmentLogger; exports.EMAIL_SUBMISSION_NAVIGATION = EMAIL_SUBMISSION_NAVIGATION; exports.EmailProviderUtils = EmailProviderUtils; exports.EmailStep = EmailStep; exports.EndpointBuilder = EndpointBuilder; exports.ExistingUserLoginStrategy = ExistingUserLoginStrategy; exports.FormFields = FormFields; exports.FormHeader = FormHeader; exports.GenericErrorHandler = GenericErrorHandler; exports.HttpClient = HttpClient; exports.HttpMethod = HttpMethod; exports.LocalStorageUtils = LocalStorageUtils; exports.LoggerFactory = LoggerFactory; exports.LoginFlowStrategyFactory = LoginFlowStrategyFactory; exports.LoginStrategyResolver = LoginStrategyResolver; exports.LoginVerificationStrategy = LoginVerificationStrategy; exports.MiddlewareConfig = MiddlewareConfig; exports.NavigationAction = NavigationAction; exports.NetworkErrorHandler = NetworkErrorHandler; exports.NextAction = NextAction; exports.PASSWORD_SUBMISSION_NAVIGATION = PASSWORD_SUBMISSION_NAVIGATION; exports.PageType = PageType; exports.PageTypePatterns = PageTypePatterns; exports.PasswordInputWithStrength = PasswordInputWithStrength; exports.PasswordStep = PasswordStep; exports.ProductionLogger = ProductionLogger; exports.ProfileStateRenderer = ProfileStateRenderer; exports.ProfileUIState = ProfileUIState; exports.RoleType = RoleType; exports.SignupFlowStrategy = SignupFlowStrategy; exports.StrategyResolutionMode = StrategyResolutionMode; exports.TokenManager = TokenManager; exports.UnauthenticatedState = UnauthenticatedState; exports.UrlCleanupHandler = UrlCleanupHandler; exports.UrlUtils = UrlUtils; exports.UserStorageManager = UserStorageManager; exports.VERIFICATION_SUBMISSION_NAVIGATION = VERIFICATION_SUBMISSION_NAVIGATION; exports.ValidationErrorHandler = ValidationErrorHandler; exports.VerificationStep = VerificationStep; exports.config = config; exports.createAuthSteps = createAuthSteps; exports.createPropsFactoryRegistry = createPropsFactoryRegistry; exports.createStepRegistry = createStepRegistry; exports.getAuthPageStepMessage = getAuthPageStepMessage; exports.getEmailField = getEmailField; exports.getForgotPasswordField = getForgotPasswordField; exports.getPasswordField = getPasswordField; exports.getStepForEmailSubmission = getStepForEmailSubmission; exports.getStepForPasswordSubmission = getStepForPasswordSubmission; exports.getStepForVerificationSubmission = getStepForVerificationSubmission; exports.getStepProgressMessage = getStepProgressMessage; exports.getTermsCheckboxField = getTermsCheckboxField; exports.getVerificationField = getVerificationField; exports.isPublicUser = isPublicUser; exports.isPublicUserEmail = isPublicUserEmail; exports.middlewareMatcher = middlewareMatcher; exports.useAuth = useAuth; exports.useAuthActionHandler = useAuthActionHandler; exports.useAuthEventBus = useAuthEventBus; exports.useAuthFlowModal = useAuthFlowModal; exports.useAuthInitializer = useAuthInitializer; exports.useIsAuthenticated = useIsAuthenticated; exports.useLogout = useLogout; exports.usePublicUserSession = usePublicUserSession; exports.useRefreshUser = useRefreshUser; exports.useSharedEventBus = useSharedEventBus; exports.useSignInRequiredParams = useSignInRequiredParams; exports.useStepRegistry = useStepRegistry; exports.useStepRenderer = useStepRenderer; exports.useStepper = useStepper; exports.useUser = useUser; exports.useUserActions = useUserActions; exports.useUserData = useUserData; exports.useUserError = useUserError; exports.useUserLoading = useUserLoading; exports.useUserProfile = useUserProfile; exports.useUserSelectors = useUserSelectors; exports.useUserStore = useUserStore; exports.userSelectors = userSelectors;
|
|
3959
|
+
exports.AUTH_ENDPOINTS = AUTH_ENDPOINTS; exports.AlertDisplay = AlertDisplay; exports.ApiErrorHandler = ApiErrorHandler; exports.AuthEventType = AuthEventType; exports.AuthFlowContainer = AuthFlowContainer; exports.AuthFlowModal = AuthFlowModal; exports.AuthFlowStep = AuthFlowStep; exports.AuthFlowVariant = AuthFlowVariant; exports.AuthInitializer = AuthInitializer; exports.AuthOrchestrator = AuthOrchestrator; exports.AuthOrchestratorFactory = AuthOrchestratorFactory; exports.AuthResultFactory = AuthResultFactory; exports.AuthService = AuthService; exports.AuthenticatedState = AuthenticatedState; exports.AuthenticationStatusContext = AuthenticationStatusContext; exports.BaseErrorHandler = BaseErrorHandler; exports.BaseEventBus = BaseEventBus; exports.BaseForm = BaseForm; exports.BaseService = BaseService; exports.BroadcastChannelEventBus = BroadcastChannelEventBus; exports.Channel = Channel; exports.CookieUtils = CookieUtils; exports.CrossTabBehaviorConfig = CrossTabBehaviorConfig; exports.CrossTabBehaviorHandler = CrossTabBehaviorHandler; exports.CrossTabDemo = CrossTabDemo; exports.DevelopmentLogger = DevelopmentLogger; exports.EMAIL_SUBMISSION_NAVIGATION = EMAIL_SUBMISSION_NAVIGATION; exports.EmailProviderUtils = EmailProviderUtils; exports.EmailStep = EmailStep; exports.EndpointBuilder = EndpointBuilder; exports.ExistingUserLoginStrategy = ExistingUserLoginStrategy; exports.FormFields = FormFields; exports.FormHeader = FormHeader; exports.HttpClient = HttpClient; exports.HttpMethod = HttpMethod; exports.LocalStorageUtils = LocalStorageUtils; exports.LoggerFactory = LoggerFactory; exports.LoginFlowStrategyFactory = LoginFlowStrategyFactory; exports.LoginStrategyResolver = LoginStrategyResolver; exports.LoginVerificationStrategy = LoginVerificationStrategy; exports.MiddlewareConfig = MiddlewareConfig; exports.NavigationAction = NavigationAction; exports.NetworkErrorHandler = NetworkErrorHandler; exports.NextAction = NextAction; exports.PASSWORD_SUBMISSION_NAVIGATION = PASSWORD_SUBMISSION_NAVIGATION; exports.PageType = PageType; exports.PageTypePatterns = PageTypePatterns; exports.PasswordInputWithStrength = PasswordInputWithStrength; exports.PasswordStep = PasswordStep; exports.ProductionLogger = ProductionLogger; exports.ProfileStateRenderer = ProfileStateRenderer; exports.ProfileUIState = ProfileUIState; exports.RoleType = RoleType; exports.SignupFlowStrategy = SignupFlowStrategy; exports.StrategyResolutionMode = StrategyResolutionMode; exports.TokenManager = TokenManager; exports.UnauthenticatedState = UnauthenticatedState; exports.UrlCleanupHandler = UrlCleanupHandler; exports.UrlUtils = UrlUtils; exports.UserStorageManager = UserStorageManager; exports.VERIFICATION_SUBMISSION_NAVIGATION = VERIFICATION_SUBMISSION_NAVIGATION; exports.VerificationStep = VerificationStep; exports.config = config; exports.createAuthSteps = createAuthSteps; exports.createPropsFactoryRegistry = createPropsFactoryRegistry; exports.createStepRegistry = createStepRegistry; exports.getAuthPageStepMessage = getAuthPageStepMessage; exports.getEmailField = getEmailField; exports.getForgotPasswordField = getForgotPasswordField; exports.getPasswordField = getPasswordField; exports.getStepForEmailSubmission = getStepForEmailSubmission; exports.getStepForPasswordSubmission = getStepForPasswordSubmission; exports.getStepForVerificationSubmission = getStepForVerificationSubmission; exports.getStepProgressMessage = getStepProgressMessage; exports.getTermsCheckboxField = getTermsCheckboxField; exports.getVerificationField = getVerificationField; exports.isPublicUser = isPublicUser; exports.isPublicUserEmail = isPublicUserEmail; exports.middlewareMatcher = middlewareMatcher; exports.useAuth = useAuth; exports.useAuthActionHandler = useAuthActionHandler; exports.useAuthEventBus = useAuthEventBus; exports.useAuthFlowModal = useAuthFlowModal; exports.useAuthInitializer = useAuthInitializer; exports.useIsAuthenticated = useIsAuthenticated; exports.useLogout = useLogout; exports.usePublicUserSession = usePublicUserSession; exports.useRefreshUser = useRefreshUser; exports.useSharedEventBus = useSharedEventBus; exports.useSignInRequiredParams = useSignInRequiredParams; exports.useStepRegistry = useStepRegistry; exports.useStepRenderer = useStepRenderer; exports.useStepper = useStepper; exports.useUser = useUser; exports.useUserActions = useUserActions; exports.useUserData = useUserData; exports.useUserError = useUserError; exports.useUserLoading = useUserLoading; exports.useUserProfile = useUserProfile; exports.useUserSelectors = useUserSelectors; exports.useUserStore = useUserStore; exports.userSelectors = userSelectors;
|
|
3923
3960
|
/*! Bundled license information:
|
|
3924
3961
|
|
|
3925
3962
|
js-cookie/dist/js.cookie.mjs:
|