Mercurial > silorider
changeset 51:b87217b90048
Cache Bluesky email before asking for password.
It makes it easier to re-authenticate if the user entered the wrong password.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 08 Oct 2023 13:49:30 -0700 |
parents | 53d6c58a98e0 |
children | 5d77532cd3ea |
files | silorider/silos/bluesky.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/silorider/silos/bluesky.py Sun Oct 08 13:48:48 2023 -0700 +++ b/silorider/silos/bluesky.py Sun Oct 08 13:49:30 2023 -0700 @@ -66,11 +66,12 @@ logger.info("Authenticating client app with Bluesky for %s" % self.ctx.silo_name) email = input("Email: ") + self.setCacheItem('email', email) + password = getpass.getpass(prompt="Application password: ") profile = self.client.login(email, password) - logger.info("Authenticated as %s" % profile.displayName) - self.setCacheItem('email', email) + logger.info("Authenticated as %s" % profile.display_name) self.setCacheItem('password', password) def onPostStart(self, ctx):