enable-mastodon-apps icon indicating copy to clipboard operation
enable-mastodon-apps copied to clipboard

401 http code with invalid access token response: IndieAuth incompatibility

Open mikewmerritt opened this issue 2 years ago • 4 comments

Although authentication with my WordPress instance appears to be successful, when I try to post using Elk or Pinafore (and I think Tusky, though it's harder to see the codes and responses), I'm getting a number of 401 responses with "Invalid Access Token."

{
    "code": "invalid_token",
    "message": "Invalid access token",
    "data": {
        "status": 401,
        "data": []
    }
}

Previously I was also receiving a number of CORS errors but I believe those are resolved. Notably, the 'instance' and 'authentication' endpoints are returning this response. There are others like 'filters' and 'custom_emojis', but I know those are not yet implemented.

The token is listen on the Mastodon Apps page and ActivityPub and Friends are installed.

mikewmerritt avatar Apr 09 '23 01:04 mikewmerritt

Do you maybe also have another plugin that implements OAuth2, such as IndieAuth? I know the latter returns an error message if the token doesn't match for it, not giving other plugins the chance to authenticate them.

akirk avatar Apr 09 '23 07:04 akirk

I submitted a PR at https://github.com/indieweb/wordpress-indieauth/pull/245

akirk avatar Apr 09 '23 09:04 akirk

Do you maybe also have another plugin that implements OAuth2, such as IndieAuth? I know the latter returns an error message if the token doesn't match for it, not giving other plugins the chance to authenticate them.

Yes, I do. Disabling fixed the issue. I see you put in a PR in that repo.

mikewmerritt avatar Apr 09 '23 18:04 mikewmerritt

The PR was accepted but no new version of IndieAuth has been released. To help others who run into this, I'll keep this issue open until they do so.

akirk avatar Apr 13 '23 21:04 akirk