Clarify that --save stores passwords

This commit is contained in:
Andrew Ferrazzutti 2022-05-04 03:48:03 -04:00
parent 1eecf8da85
commit 6a828eb0b3
1 changed files with 7 additions and 7 deletions

View File

@ -61,8 +61,8 @@ _CMD_CONTINUE_LOGIN = "continue-login"
needs_auth=False,
management_only=True,
help_section=SECTION_AUTH,
help_text="Log in to KakaoTalk. Optionally save login credentials & have the bridge use them when needed to automatically restore your login session.",
help_args="[--save] [_email_]",
help_text="Log in to KakaoTalk. Optionally save your password so the bridge may use it when needed to restore your login session",
help_args="[--save] <_email_>",
)
async def login(evt: CommandEvent) -> None:
if await evt.sender.is_logged_in():
@ -122,8 +122,8 @@ async def login(evt: CommandEvent) -> None:
await evt.reply(f"{missing_email}.")
else:
save_warning = (
" NOTE: When saving your credentials, the bridge will store your KakaoTalk password **unencrypted** until you discard it with `$cmdprefix+sp forget-password`."
" If you would rather not have the bridge save your password, type `$cmdprefix+sp cancel`, then `$cmdprefix+sp login [_email_]` without `--save`."
" NOTE: With `--save`, the bridge will store your KakaoTalk password **unencrypted** until you discard it with `$cmdprefix+sp forget-password`."
" If you would rather not have the bridge save your password, type `$cmdprefix+sp cancel`, then `$cmdprefix+sp login <email>` without `--save`."
) if save else ""
await evt.reply(f"{send_password}.{save_warning}")
@ -277,16 +277,16 @@ async def _handle_login_failure(evt: CommandEvent, e: Exception) -> None:
needs_auth=True,
management_only=True,
help_section=SECTION_AUTH,
help_text="Delete saved login credentials, if they were saved"
help_text="Delete saved login password, if it was saved"
)
async def forget_password(evt: CommandEvent) -> None:
creds = await LoginCredential.get_by_mxid(evt.sender.mxid)
if not creds:
await evt.reply("The bridge wasn't storing your login credentials, so there was nothing to forget.")
await evt.reply("The bridge wasn't storing your password, so there was nothing to forget.")
else:
await creds.delete()
await evt.reply(
"This bridge is no longer storing your login credentials. "
"This bridge is no longer storing your password. "
"If you get logged out unexpectedly, you will have to manually log back in."
)