Bug 495585

Summary: "Requires authorization" error when connecting to a GoToSocial server
Product: [Applications] Tokodon Reporter: Joshua Goins <josh>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: carl, josh
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 24.12
Sentry Crash Report:

Description Joshua Goins 2024-10-30 15:13:55 UTC
It's harmless, but you can see it when logging into an existing account for a split second.

The error is org.kde.tokodon.http: QVariant(int, 401) QUrl("https://example.com/api/v1/custom_emojis"). I guess GtS requires authorization for this URL, or maybe it's unclear on the Mastodon API side? We probably don't need to grab this anyway if we're just beginning to login anyway.
Comment 1 Joshua Goins 2024-11-30 18:27:20 UTC
Git commit 8b2ed52e4d87e32fbdf0dd5699a6afa556fe9231 by Joshua Goins.
Committed on 30/11/2024 at 18:06.
Pushed by redstrate into branch 'master'.

Make sure to request custom emojis with authorization

Apparently servers (like GoToSocial and Mastodon) can disallow
unauthorized API access, for example in this case for getting custom
emojis.

It only makes sense to call this with authorization, so let's just make
sure it does.

M  +1    -1    src/account/abstractaccount.cpp

https://invent.kde.org/network/tokodon/-/commit/8b2ed52e4d87e32fbdf0dd5699a6afa556fe9231
Comment 2 Joshua Goins 2024-11-30 18:37:44 UTC
Git commit 70b123975a7e42adfd2b10da5bc261b2d17c1807 by Joshua Goins.
Committed on 30/11/2024 at 18:27.
Pushed by redstrate into branch 'release/24.12'.

Make sure to request custom emojis with authorization

Apparently servers (like GoToSocial and Mastodon) can disallow
unauthorized API access, for example in this case for getting custom
emojis.

It only makes sense to call this with authorization, so let's just make
sure it does.
(cherry picked from commit 8b2ed52e4d87e32fbdf0dd5699a6afa556fe9231)

M  +1    -1    src/account/abstractaccount.cpp

https://invent.kde.org/network/tokodon/-/commit/70b123975a7e42adfd2b10da5bc261b2d17c1807