Clarify that --save stores passwords
This commit is contained in:
parent
1eecf8da85
commit
6a828eb0b3
|
@ -61,8 +61,8 @@ _CMD_CONTINUE_LOGIN = "continue-login"
|
||||||
needs_auth=False,
|
needs_auth=False,
|
||||||
management_only=True,
|
management_only=True,
|
||||||
help_section=SECTION_AUTH,
|
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_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_]",
|
help_args="[--save] <_email_>",
|
||||||
)
|
)
|
||||||
async def login(evt: CommandEvent) -> None:
|
async def login(evt: CommandEvent) -> None:
|
||||||
if await evt.sender.is_logged_in():
|
if await evt.sender.is_logged_in():
|
||||||
|
@ -122,8 +122,8 @@ async def login(evt: CommandEvent) -> None:
|
||||||
await evt.reply(f"{missing_email}.")
|
await evt.reply(f"{missing_email}.")
|
||||||
else:
|
else:
|
||||||
save_warning = (
|
save_warning = (
|
||||||
" NOTE: When saving your credentials, the bridge will store your KakaoTalk password **unencrypted** until you discard it with `$cmdprefix+sp forget-password`."
|
" 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 you would rather not have the bridge save your password, type `$cmdprefix+sp cancel`, then `$cmdprefix+sp login <email>` without `--save`."
|
||||||
) if save else ""
|
) if save else ""
|
||||||
await evt.reply(f"{send_password}.{save_warning}")
|
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,
|
needs_auth=True,
|
||||||
management_only=True,
|
management_only=True,
|
||||||
help_section=SECTION_AUTH,
|
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:
|
async def forget_password(evt: CommandEvent) -> None:
|
||||||
creds = await LoginCredential.get_by_mxid(evt.sender.mxid)
|
creds = await LoginCredential.get_by_mxid(evt.sender.mxid)
|
||||||
if not creds:
|
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:
|
else:
|
||||||
await creds.delete()
|
await creds.delete()
|
||||||
await evt.reply(
|
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."
|
"If you get logged out unexpectedly, you will have to manually log back in."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue