diff --git a/src/main/java/com/loafle/overflow/central/module/email/service/EmailAuthService.java b/src/main/java/com/loafle/overflow/central/module/email/service/EmailAuthService.java index 2b300ef..91c7578 100644 --- a/src/main/java/com/loafle/overflow/central/module/email/service/EmailAuthService.java +++ b/src/main/java/com/loafle/overflow/central/module/email/service/EmailAuthService.java @@ -68,7 +68,9 @@ public class EmailAuthService { boolean res = this.isValidateTime(auth); if (!res) { - throw new OverflowException("The authentication expiration time has passed.", new Throwable()); + throw new OverflowException( + "The authentication expiration time has expired, or the token has been verified.", + new Throwable()); } auth.setAuthConfirmDate(new Date()); @@ -97,7 +99,9 @@ public class EmailAuthService { boolean res = this.isValidateTime(auth); if (!res) { - throw new OverflowException("The authentication expiration time has passed.", new Throwable()); + throw new OverflowException( + "The authentication expiration time has expired, or the token has been verified.", + new Throwable()); } auth.setAuthConfirmDate(new Date()); @@ -154,6 +158,10 @@ public class EmailAuthService { return false; } + if (null != auth.getAuthConfirmDate()) { + return false; + } + return true; }