mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-11-21 01:21:54 +08:00
fix: setting up totp when you already have backup codes
This commit is contained in:
parent
25eec809c8
commit
e2305aab30
@ -144,6 +144,9 @@ public class TokenService extends HangarComponent {
|
||||
}
|
||||
|
||||
public boolean verifyOtp(final long user, final String header) {
|
||||
if (header == null) {
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
final DecodedJWT decoded = this.verify(header.split(":")[1]);
|
||||
return decoded.getSubject().equals(String.valueOf(user));
|
||||
|
Loading…
Reference in New Issue
Block a user