Bump pyotp to 2.6.0 (#58413)
This commit is contained in:
parent
4db743d01f
commit
370c7a7ccf
5 changed files with 8 additions and 8 deletions
|
@ -25,7 +25,7 @@ from . import (
|
|||
SetupFlow,
|
||||
)
|
||||
|
||||
REQUIREMENTS = ["pyotp==2.3.0"]
|
||||
REQUIREMENTS = ["pyotp==2.6.0"]
|
||||
|
||||
CONF_MESSAGE = "message"
|
||||
|
||||
|
@ -56,10 +56,10 @@ def _generate_secret() -> str:
|
|||
|
||||
|
||||
def _generate_random() -> int:
|
||||
"""Generate a 8 digit number."""
|
||||
"""Generate a 32 digit number."""
|
||||
import pyotp # pylint: disable=import-outside-toplevel
|
||||
|
||||
return int(pyotp.random_base32(length=8, chars=list("1234567890")))
|
||||
return int(pyotp.random_base32(length=32, chars=list("1234567890")))
|
||||
|
||||
|
||||
def _generate_otp(secret: str, count: int) -> str:
|
||||
|
|
|
@ -18,7 +18,7 @@ from . import (
|
|||
SetupFlow,
|
||||
)
|
||||
|
||||
REQUIREMENTS = ["pyotp==2.3.0", "PyQRCode==1.2.1"]
|
||||
REQUIREMENTS = ["pyotp==2.6.0", "PyQRCode==1.2.1"]
|
||||
|
||||
CONFIG_SCHEMA = MULTI_FACTOR_AUTH_MODULE_SCHEMA.extend({}, extra=vol.PREVENT_EXTRA)
|
||||
|
||||
|
@ -181,7 +181,7 @@ class TotpSetupFlow(SetupFlow):
|
|||
# to fix typing complaint
|
||||
self._auth_module: TotpAuthModule = auth_module
|
||||
self._user = user
|
||||
self._ota_secret: str | None = None
|
||||
self._ota_secret: str = ""
|
||||
self._url = None # type Optional[str]
|
||||
self._image = None # type Optional[str]
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"domain": "otp",
|
||||
"name": "One-Time Password (OTP)",
|
||||
"documentation": "https://www.home-assistant.io/integrations/otp",
|
||||
"requirements": ["pyotp==2.3.0"],
|
||||
"requirements": ["pyotp==2.6.0"],
|
||||
"codeowners": [],
|
||||
"quality_scale": "internal",
|
||||
"iot_class": "local_polling"
|
||||
|
|
|
@ -1699,7 +1699,7 @@ pyotgw==1.1b1
|
|||
# homeassistant.auth.mfa_modules.notify
|
||||
# homeassistant.auth.mfa_modules.totp
|
||||
# homeassistant.components.otp
|
||||
pyotp==2.3.0
|
||||
pyotp==2.6.0
|
||||
|
||||
# homeassistant.components.openweathermap
|
||||
pyowm==3.2.0
|
||||
|
|
|
@ -1024,7 +1024,7 @@ pyotgw==1.1b1
|
|||
# homeassistant.auth.mfa_modules.notify
|
||||
# homeassistant.auth.mfa_modules.totp
|
||||
# homeassistant.components.otp
|
||||
pyotp==2.3.0
|
||||
pyotp==2.6.0
|
||||
|
||||
# homeassistant.components.openweathermap
|
||||
pyowm==3.2.0
|
||||
|
|
Loading…
Add table
Reference in a new issue