File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
## 5.0.0 - 2025-01-26
2
2
- Add support otp lifetime token functionality with expiration handling
3
+ - Replace ` InvalidOTPTokenException ` and ` UserNotFoundByMobileException ` with ` OTPException ` for better error handling
3
4
4
5
## 4.3.0 - 2024-06-21
5
6
- Add support only confirm token
Original file line number Diff line number Diff line change 13
13
'otp_token ' => 'Your OTP Token is: :token. ' ,
14
14
15
15
'otp_subject ' => 'OTP request ' ,
16
+
17
+ 'token_has_been_expired_or_invalid ' => 'the token has been expired or invalid ' ,
18
+
19
+ 'user_not_found_by_mobile ' => 'user not found by mobile ' ,
20
+
21
+ 'otp_has_already_been_sent_for_this_mobile ' => 'OTP has already been sent for this mobile ' ,
16
22
];
Original file line number Diff line number Diff line change @@ -8,16 +8,16 @@ class OTPException extends Exception
8
8
{
9
9
public static function whenOtpTokenIsInvalid (): static
10
10
{
11
- return new static ('The token has been expired or invalid. ' );
11
+ return new static ('token_has_been_expired_or_invalid ' );
12
12
}
13
13
14
14
public static function whenUserNotFoundByMobile (): static
15
15
{
16
- return new static ('User not found by mobile. ' );
16
+ return new static ('user_not_found_by_mobile ' );
17
17
}
18
18
19
19
public static function whenOtpAlreadySent (): static
20
20
{
21
- return new static ('OTP has already been sent for this mobile. ' );
21
+ return new static ('otp_has_already_been_sent_for_this_mobile ' );
22
22
}
23
23
}
You can’t perform that action at this time.
0 commit comments