Skip to content

Commit

Permalink
Strip usual spaces from OTP shared secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrien Ferrand committed Sep 15, 2023
1 parent e2f572b commit cc06ca9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lexicon/_private/providers/hover.py
@@ -1,6 +1,7 @@
"""Module provider for Hover"""
import json
import logging
import re
from argparse import ArgumentParser
from typing import List

Expand Down Expand Up @@ -38,7 +39,8 @@ def __init__(self, config):
self.domain_id = None
self.api_endpoint = "https://www.hover.com/api"
self.cookies = {}
self.totp = pyotp.TOTP(self._get_provider_option("auth_totp_secret"))
shared_secret = re.sub(r"\s*", "", self._get_provider_option("auth_totp_secret") or "")
self.totp = pyotp.TOTP(shared_secret)

def authenticate(self) -> None:
# Getting required cookies "hover_session" and "hoverauth"
Expand Down

0 comments on commit cc06ca9

Please sign in to comment.