diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f88ab2e6..7139e36a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -99,7 +99,7 @@ jobs:
run: |
cd src/main/frontend
npm install --legacy-peer-deps
- npm run-script build
+ npm run-script production-build
- name: docker push
run: |
diff --git a/pom.xml b/pom.xml
index 27c8d2fd..d255e260 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
org.springframework.boot
spring-boot-starter-parent
- 3.0.0
+ 3.0.1
@@ -19,12 +19,12 @@
17
- 1.7.21
+ 1.7.22
1.33
1.13.2
2.18.24
- 1.6.11
+ 2.0.0-alpha-3
1.0.0
2.27.2
1.3
@@ -48,13 +48,6 @@
spring-boot-starter-mail
-
-
- javax.mail
- mail
- 1.4.7
- test
-
com.icegreen
diff --git a/src/main/frontend/app/login/index.js b/src/main/frontend/app/login/LoginPage.js
similarity index 67%
rename from src/main/frontend/app/login/index.js
rename to src/main/frontend/app/login/LoginPage.js
index 91d6c026..a7980b52 100644
--- a/src/main/frontend/app/login/index.js
+++ b/src/main/frontend/app/login/LoginPage.js
@@ -1,14 +1,13 @@
-import React from 'react';
-import ReactDOM from 'react-dom';
+import ReactDOM from "react-dom";
+import React from "react";
+import {Box, Divider, Grid, ThemeProvider} from "@mui/material";
import theme from "../component/styles";
import Template from "../component/Template";
import FormInputTextField from "../component/FormInputTextField";
+import {Fingerprint, Person} from "@mui/icons-material";
import Separator from "../component/Separator";
import FormButton from "../component/FormButton";
-import {HashRouter, Link} from "react-router-dom";
-import {Route, Routes, useNavigate} from "react-router";
-import {Box, Divider, Grid, ThemeProvider, Typography} from "@mui/material";
-import {Fingerprint, Person, VpnKey} from "@mui/icons-material";
+
const VAuthenticatorTitle = () => {
return
}
-const LoginMainPage = (props) => {
- return (
-
-
- }/>
- }/>
- }/>
-
- )
-}
-
const Login = (props) => {
const {rawFeatures} = props;
@@ -109,7 +94,7 @@ const Login = (props) => {
are you not registered? if you want you can register here
let resetPasswordLink =
-
do you have forgot your password? please click here to recover
+ do you have forgot your password? please click here to recover
your
password
@@ -158,80 +143,7 @@ const Login = (props) => {
)
}
-
-const ResetPasswordChallengeSender = (props) => {
- const [email, setEmail] = React.useState("")
- let navigate = useNavigate();
-
- const sentResetPasswordChallenge = (email) => {
- return fetch(`/api/mail/${email}/rest-password-challenge`, {
- method: "PUT",
- credentials: 'same-origin'
- }).then(r => {
- if (r.status === 204) {
- navigate("/reset-password-challenge-sent", {replace: true});
- }
- })
- }
-
- return (
-
-
-
- Reset your password
-
-
-
-
-
-
-
- {
- setEmail(value.target.value)
- }}
- value={email || ""}
- suffix={}/>
-
-
-
- {
- sentResetPasswordChallenge(email)
- }}/>
-
-
-
-
-
- )
-}
-
-const SuccessfulResetPasswordMailChallenge = () => {
- return (
-
-
-
- Reset Password
-
-
-
-
-
-
-
- We are sent an email on your account inbox please follow the instruction on the mail to reset yout
- password
-
-
-
- )
-}
-
-
if (document.getElementById('app')) {
let features = document.getElementById('features').innerHTML
- ReactDOM.render(, document.getElementById('app'));
+ ReactDOM.render(, document.getElementById('app'));
}
\ No newline at end of file
diff --git a/src/main/frontend/app/reset-password/ResetPasswordChallengeSenderPage.js b/src/main/frontend/app/reset-password/ResetPasswordChallengeSenderPage.js
new file mode 100644
index 00000000..1819ee24
--- /dev/null
+++ b/src/main/frontend/app/reset-password/ResetPasswordChallengeSenderPage.js
@@ -0,0 +1,63 @@
+import ReactDOM from "react-dom";
+import React from "react";
+import {Box, Divider, Grid, ThemeProvider, Typography} from "@mui/material";
+import theme from "../component/styles";
+import Template from "../component/Template";
+import {Person, VpnKey} from "@mui/icons-material";
+import FormInputTextField from "../component/FormInputTextField";
+import Separator from "../component/Separator";
+import FormButton from "../component/FormButton";
+
+
+const ResetPasswordChallengeSender = (props) => {
+ const [email, setEmail] = React.useState("")
+
+ const sentResetPasswordChallenge = (email) => {
+ return fetch(`/api/mail/${email}/rest-password-challenge`, {
+ method: "PUT",
+ credentials: 'same-origin'
+ }).then(r => {
+ if (r.status === 204) {
+ window.location.href = "/reset-password/successful-reset-password-mail-challenge";
+ }
+ })
+ }
+
+ return (
+
+
+
+ Reset your password
+
+
+
+
+
+
+
+ {
+ setEmail(value.target.value)
+ }}
+ value={email || ""}
+ suffix={}/>
+
+
+
+ {
+ sentResetPasswordChallenge(email)
+ }}/>
+
+
+
+
+
+ )
+}
+if (document.getElementById('app')) {
+ let features = document.getElementById('features').innerHTML
+ ReactDOM.render(, document.getElementById('app'));
+}
\ No newline at end of file
diff --git a/src/main/frontend/app/reset-password/reset-password.js b/src/main/frontend/app/reset-password/ResetPasswordPage.js
similarity index 100%
rename from src/main/frontend/app/reset-password/reset-password.js
rename to src/main/frontend/app/reset-password/ResetPasswordPage.js
diff --git a/src/main/frontend/app/reset-password/successful-password-reset.js b/src/main/frontend/app/reset-password/SuccessfulPasswordReset.js
similarity index 100%
rename from src/main/frontend/app/reset-password/successful-password-reset.js
rename to src/main/frontend/app/reset-password/SuccessfulPasswordReset.js
diff --git a/src/main/frontend/app/reset-password/SuccessfulResetPasswordMailChallengePage.js b/src/main/frontend/app/reset-password/SuccessfulResetPasswordMailChallengePage.js
new file mode 100644
index 00000000..411ce047
--- /dev/null
+++ b/src/main/frontend/app/reset-password/SuccessfulResetPasswordMailChallengePage.js
@@ -0,0 +1,34 @@
+import ReactDOM from "react-dom";
+import React from "react";
+import {Divider, Grid, ThemeProvider, Typography} from "@mui/material";
+import theme from "../component/styles";
+import Template from "../component/Template";
+import {VpnKey} from "@mui/icons-material";
+
+
+const SuccessfulResetPasswordMailChallenge = () => {
+ return (
+
+
+
+ Reset Password
+
+
+
+
+
+
+
+ We are sent an email on your account inbox please follow the instruction on the mail to reset yout
+ password
+
+
+
+ )
+}
+
+
+if (document.getElementById('app')) {
+ let features = document.getElementById('features').innerHTML
+ ReactDOM.render(, document.getElementById('app'));
+}
\ No newline at end of file
diff --git a/src/main/frontend/app/signup/SignUpPage.js b/src/main/frontend/app/signup/SignUpPage.js
index da66f6d1..7514992c 100644
--- a/src/main/frontend/app/signup/SignUpPage.js
+++ b/src/main/frontend/app/signup/SignUpPage.js
@@ -4,12 +4,12 @@ import FormInputTextField from "../component/FormInputTextField";
import FormButton from "../component/FormButton";
import {signUp} from "./SignUpRepository";
-import {useNavigate} from "react-router";
import FormDatePicker, {ApiDateFormatPattern} from "../component/FormDatePicker";
import {Divider, Grid, ThemeProvider, Typography} from "@mui/material";
import {GroupAdd, VpnKey} from "@mui/icons-material";
import theme from "../component/styles";
import FormInputMask from "../component/FormInputMask";
+import {createRoot} from "react-dom/client";
const SignUpPage = () => {
const [email, setEmail] = React.useState("")
@@ -19,8 +19,6 @@ const SignUpPage = () => {
const [birthDate, setBirthDate] = React.useState("")
const [phone, setPhone] = React.useState("")
- let navigate = useNavigate();
-
return (
@@ -105,7 +103,7 @@ const SignUpPage = () => {
})
.then(r => {
if (r.status === 201) {
- navigate("/succeeded", {replace: true});
+ window.location.href="/sign-up/succeeded";
}
})
}}
@@ -116,4 +114,9 @@ const SignUpPage = () => {
)
}
-export default SignUpPage
\ No newline at end of file
+if (document.getElementById('app')) {
+ let features = document.getElementById('features').innerHTML
+ const container = document.getElementById('app');
+ const root = createRoot(container);
+ root.render();
+}
\ No newline at end of file
diff --git a/src/main/frontend/app/signup/SuccessfulSignUpPage.js b/src/main/frontend/app/signup/SuccessfulSignUpPage.js
index a052e81f..05aab028 100644
--- a/src/main/frontend/app/signup/SuccessfulSignUpPage.js
+++ b/src/main/frontend/app/signup/SuccessfulSignUpPage.js
@@ -3,6 +3,7 @@ import Template from "../component/Template";
import {Divider, Grid, ThemeProvider, Typography} from "@mui/material";
import {VpnKey} from "@mui/icons-material";
import theme from "../component/styles";
+import {createRoot} from "react-dom/client";
const SuccessfulSignUpPage = () => {
return (
@@ -25,4 +26,9 @@ const SuccessfulSignUpPage = () => {
}
-export default SuccessfulSignUpPage
\ No newline at end of file
+if (document.getElementById('app')) {
+ let features = document.getElementById('features').innerHTML
+ const container = document.getElementById('app');
+ const root = createRoot(container);
+ root.render();
+}
\ No newline at end of file
diff --git a/src/main/frontend/app/signup/index.js b/src/main/frontend/app/signup/index.js
deleted file mode 100644
index 5b734e77..00000000
--- a/src/main/frontend/app/signup/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import React from 'react';
-import {HashRouter} from 'react-router-dom';
-import SignUpPage from "./SignUpPage";
-import SuccessfulSignUpPage from "./SuccessfulSignUpPage";
-import {Route, Routes} from "react-router";
-import {createRoot} from "react-dom/client";
-
-const SignUpFlow = (props) => {
- return (
-
-
- }/>
- }/>
-
- )
-
-}
-
-if (document.getElementById('app')) {
- let features = document.getElementById('features').innerHTML
- const container = document.getElementById('app');
- const root = createRoot(container);
- root.render();
-}
\ No newline at end of file
diff --git a/src/main/frontend/package.json b/src/main/frontend/package.json
index e806baed..978df578 100644
--- a/src/main/frontend/package.json
+++ b/src/main/frontend/package.json
@@ -9,7 +9,8 @@
]
},
"scripts": {
- "build": "webpack --config webpack.config.js",
+ "build": "webpack --config webpack.config.js --mode=development",
+ "production-build": "webpack --config webpack.config.js --mode=production",
"watch": "webpack --watch"
},
"author": "mrFlick72",
@@ -38,8 +39,6 @@
"react": "18.2.0",
"react-datetime": "3.1.1",
"react-dom": "18.2.0",
- "react-imask": "^6.4.3",
- "react-router": "^6.3.0",
- "react-router-dom": "^6.3.0"
+ "react-imask": "^6.4.3"
}
}
diff --git a/src/main/frontend/webpack.config.js b/src/main/frontend/webpack.config.js
index 17bb9ffc..05dc33c0 100644
--- a/src/main/frontend/webpack.config.js
+++ b/src/main/frontend/webpack.config.js
@@ -3,14 +3,16 @@ var path = require('path');
const BUID_DIR = path.resolve(__dirname + "/dist");
module.exports = {
- mode: 'development',
entry: {
healthz: path.resolve(__dirname, './app/healthz/healthz.js'),
- login: path.resolve(__dirname, './app/login/index.js'),
+ login: path.resolve(__dirname, './app/login/LoginPage.js'),
mfa: path.resolve(__dirname, './app/mfa/index.js'),
- signup: path.resolve(__dirname, './app/signup/index.js'),
- resetPassword: path.resolve(__dirname, './app/reset-password/reset-password.js'),
- successfulPasswordReset: path.resolve(__dirname, './app/reset-password/successful-password-reset.js')
+ signup: path.resolve(__dirname, './app/signup/SignUpPage.js'),
+ SuccessfulSignUp: path.resolve(__dirname, './app/signup/SuccessfulSignUpPage.js'),
+ resetPasswordChallengeSender: path.resolve(__dirname, './app/reset-password/ResetPasswordChallengeSenderPage.js'),
+ successfulResetPasswordMailChallenge: path.resolve(__dirname, './app/reset-password/SuccessfulResetPasswordMailChallengePage.js'),
+ resetPassword: path.resolve(__dirname, './app/reset-password/ResetPasswordPage.js'),
+ successfulPasswordReset: path.resolve(__dirname, './app/reset-password/SuccessfulPasswordReset.js')
},
resolve: {
extensions: [".js", ".jsx"]
diff --git a/src/main/kotlin/com/vauthenticator/server/account/resetpassword/RestePasswordEndPoint.kt b/src/main/kotlin/com/vauthenticator/server/account/resetpassword/RestePasswordEndPoint.kt
index ef5cb2ef..18af3ff3 100644
--- a/src/main/kotlin/com/vauthenticator/server/account/resetpassword/RestePasswordEndPoint.kt
+++ b/src/main/kotlin/com/vauthenticator/server/account/resetpassword/RestePasswordEndPoint.kt
@@ -43,6 +43,19 @@ class ResetPasswordEndPoint(
@Controller
class ResetPasswordController(private val objectMapper: ObjectMapper) {
+
+ @GetMapping("/reset-password/reset-password-challenge-sender")
+ fun resetPasswordChallengeSenderPage(model: Model): String {
+ model.addAttribute("assetBundle", "resetPasswordChallengeSender_bundle.js")
+ return "template"
+ }
+
+ @GetMapping("/reset-password/successful-reset-password-mail-challenge")
+ fun successfulResetPasswordMailChallengePage(model: Model): String {
+ model.addAttribute("assetBundle", "successfulResetPasswordMailChallenge_bundle.js")
+ return "template"
+ }
+
@GetMapping("/reset-password/{ticket}")
fun resetPasswordPage(@PathVariable ticket: String, model: Model): String {
val metadata = mapOf("ticket" to ticket)
diff --git a/src/main/kotlin/com/vauthenticator/server/account/signup/SignUpController.kt b/src/main/kotlin/com/vauthenticator/server/account/signup/SignUpController.kt
index 7bc9b04a..9c9228cd 100644
--- a/src/main/kotlin/com/vauthenticator/server/account/signup/SignUpController.kt
+++ b/src/main/kotlin/com/vauthenticator/server/account/signup/SignUpController.kt
@@ -11,8 +11,13 @@ import org.springframework.web.bind.annotation.SessionAttributes
class SignUpController {
@GetMapping("/sign-up")
- fun view(@ModelAttribute("features") features: List, model: Model): String {
+ fun signUp(@ModelAttribute("features") features: List, model: Model): String {
model.addAttribute("assetBundle", "signup_bundle.js")
return "template"
}
+ @GetMapping("/sign-up/succeeded")
+ fun SuccessfulSignUp(@ModelAttribute("features") features: List, model: Model): String {
+ model.addAttribute("assetBundle", "SuccessfulSignUp_bundle.js")
+ return "template"
+ }
}
\ No newline at end of file