forked from platypush/platypush
[core] Skip 2FA code verification for JWT tokens.
This commit is contained in:
parent
a11f17aa8f
commit
79dc5e238d
1 changed files with 2 additions and 2 deletions
|
@ -419,7 +419,7 @@ class UserManager:
|
|||
:return: The generated JWT token as a string.
|
||||
:raises: :class:`platypush.exceptions.user.InvalidCredentialsException` in case of invalid credentials.
|
||||
"""
|
||||
user = self.authenticate_user(username, password)
|
||||
user = self.authenticate_user(username, password, skip_2fa=True)
|
||||
if not user:
|
||||
raise InvalidCredentialsException()
|
||||
|
||||
|
@ -457,7 +457,7 @@ class UserManager:
|
|||
raise InvalidJWTTokenException('Expired JWT token')
|
||||
|
||||
user = self.authenticate_user(
|
||||
payload.get('username', ''), payload.get('password', '')
|
||||
payload.get('username', ''), payload.get('password', ''), skip_2fa=True
|
||||
)
|
||||
|
||||
if not user:
|
||||
|
|
Loading…
Reference in a new issue