Make browser login the default

pull/70/head
Ivan Habunek 2018-06-15 09:39:28 +02:00
rodzic 16c2741181
commit aabfd0fa31
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: CDBD63C43A30BB95
3 zmienionych plików z 9 dodań i 7 usunięć

Wyświetl plik

@ -6,6 +6,8 @@ Changelog
* Add support for replying to a toot (#6)
* Add `toot delete` command for deleting a toot (#54)
* Add global `--quiet` flag to silence output (#46)
* Make `toot login` provide browser login, and `toot login_cli` log in via
console. This makes it clear what's the preferred option.
* Use Idempotency-Key header to prevent multiple toots being posted if request
is retried

Wyświetl plik

@ -92,7 +92,7 @@ def auth(app, user, args):
print_out("\nAuth tokens are stored in: <blue>{}</blue>".format(path))
def login(app, user, args):
def login_cli(app, user, args):
app = create_app_interactive(instance=args.instance)
login_interactive(app, args.email)
@ -100,7 +100,7 @@ def login(app, user, args):
print_out("<green>✓ Successfully logged in.</green>")
def login_browser(app, user, args):
def login(app, user, args):
app = create_app_interactive(instance=args.instance)
login_browser_interactive(app)

Wyświetl plik

@ -60,14 +60,14 @@ email_arg = (["-e", "--email"], {
AUTH_COMMANDS = [
Command(
name="login",
description="Log in from the console, does NOT support two factor authentication",
arguments=[instance_arg, email_arg],
description="Log into a mastodon instance using your browser (recommended)",
arguments=[instance_arg],
require_auth=False,
),
Command(
name="login_browser",
description="Log in using your browser, supports regular and two factor authentication",
arguments=[instance_arg],
name="login_cli",
description="Log in from the console, does NOT support two factor authentication",
arguments=[instance_arg, email_arg],
require_auth=False,
),
Command(