@micha.bigler/ui-core-micha 2.3.2 → 2.4.0
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.
|
@@ -3,9 +3,9 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
//
|
|
4
4
|
// S13: Completes a pending registration. Reads the signed pending-token from
|
|
5
5
|
// the URL (`?token=...`), asks the user for a password, and POSTs to
|
|
6
|
-
// `register_confirm`. On success, the
|
|
7
|
-
//
|
|
8
|
-
//
|
|
6
|
+
// `register_confirm`. On success, the user is sent to /login to sign in
|
|
7
|
+
// explicitly — matches the existing invite/password-reset pattern and
|
|
8
|
+
// preserves any MFA / login-event flow the app may enforce.
|
|
9
9
|
import React, { useMemo, useState } from 'react';
|
|
10
10
|
import { useLocation, useNavigate } from 'react-router-dom';
|
|
11
11
|
import { Alert, Box, Button, Stack, TextField, Typography, } from '@mui/material';
|
|
@@ -43,10 +43,10 @@ export function SignupConfirmPage() {
|
|
|
43
43
|
setSubmitting(true);
|
|
44
44
|
try {
|
|
45
45
|
await confirmRegistration({ token: tokenFromUrl, password });
|
|
46
|
-
//
|
|
47
|
-
// session
|
|
48
|
-
//
|
|
49
|
-
|
|
46
|
+
// Send the user to /login. Aligned with PasswordInvitePage; no implicit
|
|
47
|
+
// session that would bypass MFA challenges or skip the explicit login
|
|
48
|
+
// event in audit logs.
|
|
49
|
+
navigate('/login', { replace: true });
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micha.bigler/ui-core-micha",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -14,10 +14,12 @@
|
|
|
14
14
|
"@mui/material": "^7.3.5",
|
|
15
15
|
"@mui/x-data-grid": "^8.4.0",
|
|
16
16
|
"axios": "^1.0.0",
|
|
17
|
+
"i18next": "^25.10.10 || ^26.0.0",
|
|
17
18
|
"qrcode.react": "^4.2.0",
|
|
18
19
|
"react": "^19.2.1",
|
|
19
20
|
"react-dom": "^19.2.1",
|
|
20
21
|
"react-helmet": "^6.0.0",
|
|
22
|
+
"react-i18next": "^16.3.5 || ^17.0.0",
|
|
21
23
|
"react-router-dom": "^7.9.6"
|
|
22
24
|
},
|
|
23
25
|
"scripts": {
|
|
@@ -25,9 +27,8 @@
|
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
29
|
"@mui/icons-material": "^7.3.11",
|
|
30
|
+
"i18next": "^26.2.0",
|
|
31
|
+
"react-i18next": "^17.0.8",
|
|
28
32
|
"typescript": "^5.9.3"
|
|
29
|
-
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"react-i18next": "^16.3.5"
|
|
32
33
|
}
|
|
33
34
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
//
|
|
3
3
|
// S13: Completes a pending registration. Reads the signed pending-token from
|
|
4
4
|
// the URL (`?token=...`), asks the user for a password, and POSTs to
|
|
5
|
-
// `register_confirm`. On success, the
|
|
6
|
-
//
|
|
7
|
-
//
|
|
5
|
+
// `register_confirm`. On success, the user is sent to /login to sign in
|
|
6
|
+
// explicitly — matches the existing invite/password-reset pattern and
|
|
7
|
+
// preserves any MFA / login-event flow the app may enforce.
|
|
8
8
|
import React, { useMemo, useState } from 'react';
|
|
9
9
|
import { useLocation, useNavigate } from 'react-router-dom';
|
|
10
10
|
import {
|
|
@@ -55,10 +55,10 @@ export function SignupConfirmPage() {
|
|
|
55
55
|
setSubmitting(true);
|
|
56
56
|
try {
|
|
57
57
|
await confirmRegistration({ token: tokenFromUrl, password });
|
|
58
|
-
//
|
|
59
|
-
// session
|
|
60
|
-
//
|
|
61
|
-
|
|
58
|
+
// Send the user to /login. Aligned with PasswordInvitePage; no implicit
|
|
59
|
+
// session that would bypass MFA challenges or skip the explicit login
|
|
60
|
+
// event in audit logs.
|
|
61
|
+
navigate('/login', { replace: true });
|
|
62
62
|
return;
|
|
63
63
|
} catch (err) {
|
|
64
64
|
setErrorKey(err?.code || 'Auth.PENDING_TOKEN_INVALID');
|