diff options
author | tastytea | 2020-11-13 13:03:49 +0100 |
---|---|---|
committer | tastytea | 2020-11-13 13:03:49 +0100 |
commit | 24cb2d523d631f752789f2d54b951217b2c5aa20 (patch) | |
tree | 1e3be3893f6c6647a4a3b291572f1656081d389e | |
parent | 41f470d2aad10558be7e458c666cc1666a7537d6 (diff) | |
download | mastodonpp-24cb2d523d631f752789f2d54b951217b2c5aa20.tar mastodonpp-24cb2d523d631f752789f2d54b951217b2c5aa20.tar.gz mastodonpp-24cb2d523d631f752789f2d54b951217b2c5aa20.zip |
ObtainToken: Change grant_type to authorization_code.
client_credentials worked before but not anymore. 🤷
-rw-r--r-- | src/instance.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/instance.cpp b/src/instance.cpp index 5056242..5654770 100644 --- a/src/instance.cpp +++ b/src/instance.cpp @@ -226,14 +226,11 @@ answer_type Instance::ObtainToken::step_1(const string_view client_name, answer_type Instance::ObtainToken::step_2(const string_view code) { - parametermap parameters - { - {"client_id", _client_id}, - {"client_secret", _client_secret}, - {"redirect_uri", "urn:ietf:wg:oauth:2.0:oob"}, - {"code", code}, - {"grant_type", "client_credentials"} - }; + parametermap parameters{{"client_id", _client_id}, + {"client_secret", _client_secret}, + {"redirect_uri", "urn:ietf:wg:oauth:2.0:oob"}, + {"code", code}, + {"grant_type", "authorization_code"}}; if (!_scopes.empty()) { parameters.insert({"scope", _scopes}); |