소스 검색

Maybe fix SMS 2fa in login script

Tulir Asokan 2 년 전
부모
커밋
692b025eec
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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 🤔")