Parcourir la source

Maybe fix SMS 2fa in login script

Tulir Asokan il y a 2 ans
Parent
commit
692b025eec
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      mauigpapi/scripts/iglogin.py

+ 2 - 1
mauigpapi/scripts/iglogin.py

@@ -38,10 +38,11 @@ async def main():
                         if twofactor == "r":
                             if inf.sms_two_factor_on:
                                 print("Re-requesting SMS code...")
-                                await api.send_two_factor_login_sms(
+                                resp = await api.send_two_factor_login_sms(
                                     username, identifier=inf.two_factor_identifier
                                 )
                                 print("SMS code re-requested")
+                                inf = resp.two_factor_info
                                 inf.totp_two_factor_on = False
                             else:
                                 print("You don't have SMS 2FA on 🤔")