Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oauth2 code doesn't work without a config file? #28

Open
rjp opened this issue Jan 12, 2023 · 1 comment
Open

oauth2 code doesn't work without a config file? #28

rjp opened this issue Jan 12, 2023 · 1 comment

Comments

@rjp
Copy link
Contributor

rjp commented Jan 12, 2023

If I do madonctl -i blah oauth2 get-url, visit the URL, then put the code into madonctl -i blah oauth2 code, it doesn't work because madonctl will create a new app for the code call (because there's no config file.)

Not sure if this is a Mastodon quirk where you'll always get the same client_id + client_secret pair for a particular client_name, etc. but it definitely doesn't work on Pleroma or GotoSocial.

Easiest fix is probably to print the required config for the code subcommand and advise the user to create that (although this is a pain with GotoSocial since it has a ludicrously short 1 minute timeout on oauth tokens.)

Or automatically dump the relevant values into a temporary config file and print out the correct command to call?

Something like...

> madonctl -i blah oauth2 get-url
[... url ...]

Temporary config is in [client_id].yaml; enter it with:
madonctl --config [client_id].yaml oauth2 code #CODE 
@rjp
Copy link
Contributor Author

rjp commented Jan 12, 2023

Although I have just noticed (by browsing some old issues) that you can just do madonctl -i blah oauth2 and enter the code in a single flow. Which definitely works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant