Don't delete saved creds if a login is blocked & forced login is off
This commit is contained in:
parent
76d0ead99f
commit
c691372c6a
|
@ -317,6 +317,8 @@ class User(DBUser, BaseUser):
|
||||||
oauth_credential = await Client.login(uuid=uuid, form=form, forced=True)
|
oauth_credential = await Client.login(uuid=uuid, form=form, forced=True)
|
||||||
except OAuthException as e:
|
except OAuthException as e:
|
||||||
latest_exc = e
|
latest_exc = e
|
||||||
|
else:
|
||||||
|
return False
|
||||||
if oauth_credential:
|
if oauth_credential:
|
||||||
self.oauth_credential = oauth_credential
|
self.oauth_credential = oauth_credential
|
||||||
await self.save()
|
await self.save()
|
||||||
|
|
Loading…
Reference in New Issue