修复判断错误

This commit is contained in:
xmdhs 2023-11-25 18:40:02 +08:00
parent 8071de4d72
commit cc34268104
No known key found for this signature in database
GPG Key ID: E809D6D43DEFCC95

View File

@ -168,7 +168,7 @@ func (e EmailService) VerifyJwt(email, jwtStr, path string) error {
}
sub, _ := token.Claims.GetSubject()
iss, _ := token.Claims.GetIssuer()
if !token.Valid || sub != email || iss+path != issuer {
if !token.Valid || sub != email || issuer+path != iss {
return fmt.Errorf("VerifyJwt: %w", ErrTokenInvalid)
}
return nil