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

[bug] Can't authorize trakt.tv - invalid credentials #3542

Open
Karmalakas opened this issue Nov 14, 2024 · 3 comments
Open

[bug] Can't authorize trakt.tv - invalid credentials #3542

Karmalakas opened this issue Nov 14, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Karmalakas
Copy link

GTS v0.17.3 on TrueNAS Scale 24.10

So I want to authorize a web app to post on my behalf (trakt.tv in this specific case). Here are the steps:

  1. On their page I enter my instance domain and I get redirected to https://my.instance.tld/oauth/authorize?client_id=01F...&redirect_uri=https%3A%2F%2Ftrakt.tv%2Fauth%2Fauth%2Fmastodon%2Fcallback&response_type=code&scope=read%3Aaccounts+write%3Astatuses&state=afc...
  2. Then instant redirect to https://my.instance.tld/auth/sign_in where I enter my account credentials and submit
  3. I'm redirected to https://my.instance.tld/oauth/authorize where I'm greeted with the message about scopes and "Allow" button
  4. After I click "Allow", I'm redirected back to https://trakt.tv/auth/auth/mastodon/callback?code=ZTK...&state=afc... where I get "invalid credentials" message

I don't have any problem authorizing this app with botsin.space account - works flawlessly 🙄

Could it be, that in the background Trakt makes a https://my.instance.tld/api/v1/accounts/verify_credentials request which fails with "invalid credentials"?

Could it be simply because of scopes? read:accounts write:statuses instead of just read write?

Is there anything I could investigate myself? I checked the logs, but didn't notice anything (I might've missed something because it's flooded with irrelevant entries)

I talked to Trakt support, but they say there's not much they can do 😞

P. S. I managed to authorize a couple of other apps, although there are other issues, which I'll submit later

@tsmethurst tsmethurst changed the title Web app authorization won't work - invalid credentials [bug] Can't authorize trakt.tv - invalid credentials Nov 14, 2024
@tsmethurst
Copy link
Contributor

Hiya, if GtS is redirecting you back to the app's redirect_uri then there won't be any helpful logs because as far as GoToSocial is concerned, everything works as expected. Maybe trakt.tv doesn't like something about the code or state that's being provided in the query parameters, but I've no clue what it might be objecting to, or why. Is that an open source project, do you know? If so we could just have a look at the code for handling callbacks and see what it's trying to do.

@tsmethurst tsmethurst added the bug Something isn't working label Nov 14, 2024
@Karmalakas
Copy link
Author

Is that an open source project

Unfortunately, no. I've asked their developer if it would be possible to get more info

@tsmethurst
Copy link
Contributor

Alright, cheers, keep us in the loop :) If this points to an OAuth bug on our side that's something we can look at fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants