You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
self.Logger.error("The email address or password is wrong. Re-run the Bambu Connect installer or use the docker files to update your email address and password.")
self.Logger.error("To factor auth is enabled on this account. Bambu Lab doesn't allow us to support two factor auth, so it must be disabled on your account or LAN Only mode must be used on the printer.")
439
+
self.Logger.error("Two factor auth is enabled on this account. Bambu Lab doesn't allow us to support two factor auth, so it must be disabled on your account or the local connection mode.")
self.Logger.error("This account requires an email code to login. Bambu Lab doesn't allow us to support this, so you must use the local connection mode.")
440
442
else:
441
443
self.Logger.error("Unknown error, we will try again later.")
raiseException(" TODO - We never finished this because we can't login with the email code. We also need to convert GetDeviceList to use _DoBambuCloudApiRequest ")
# If the user has two factor auth enabled, this will still return 200, but there will be a tfaKey field with a string.
90
93
j=response.json()
91
-
tfaKey=j.get('tfaKey', None)
92
-
iftfaKeyisnotNoneandlen(tfaKey) >0:
94
+
loginType=j.get("loginType", None)
95
+
ifloginTypeisNone:
96
+
# This is unexpected, but if we get an access token we don't care.
97
+
self.Logger.warn("Bambu cloud loginType not found")
98
+
elifloginType=='tfa':
93
99
self.Logger.error("Login Bambu Cloud failed because two factor auth is enabled. Bambu Lab's APIs don't allow us to support two factor at this time.")
94
100
returnLoginStatus.TwoFactorAuthEnabled
101
+
elifloginType=='verifyCode':
102
+
self.Logger.error("Login Bambu Cloud failed because an email two factor code is required. Bambu Lab's APIs don't allow us to support two factor at this time.")
0 commit comments