Working Implementation for resetting passwords based on a One Time Passcode (OTP). first request Token by stating your email to /request-password-forgot. OTP will be sent via email. Then just type in email, the OTP and a new password to /reset-password.
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good

IMPORTANT - EMAIL SETUP in application.properties (if gmail):
#mail provider
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=<email>
# Nutze bei Gmail ein "App-Passwort", nicht dein normales (16 stellig)
spring.mail.password=xxxx xxxx xxxx xxxx
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
This commit is contained in:
Daniel
2026-02-17 18:56:59 +01:00
parent 2c0dfaf77b
commit 3d4f6a4d26
7 changed files with 194 additions and 9 deletions
@@ -0,0 +1,5 @@
package SuMoC.backend.security.exceptions;
public class InvalidTokenException extends RuntimeException {
public InvalidTokenException(String message) { super(message); }
}