Steps to reproduce the problem
Attempt to authenticate using oAuth
Expected behaviour
Authorization confirmation page
Actual behaviour
Page with error: Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.
Detailed description
As mentioned in snarfed/bridgy#1602 (comment), the problem seems to be related to the app being deleted from the oauth_applications database table.
My assumption is that the first time someone on an instance attempts to authenticate with that app, it all works, the app information is stored in the oauth_applications, and the remote developer stores the uid.
Then the user ends up never using that app or removing the authorization from their account "Authorized Apps". This should not delete the app from oauth_applications because the remote developer still believes the uid exists.
Months later, when that user or another user on the instance attempts to authenticate again, the remote app requests to authenticate with the uid they have stored, and the authentication fails with Doorkeeper invalid_client: "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method".
I have reports of this issue happening with Buffer, Bridgy and elk.zone. I could confirm this issue on a couple of instances that I host and on other instances not hosted by me.
Mastodon instance
Multiple
Mastodon version
v4.2.1
Steps to reproduce the problem
Attempt to authenticate using oAuth
Expected behaviour
Authorization confirmation page
Actual behaviour
Page with error: Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.
Detailed description
As mentioned in snarfed/bridgy#1602 (comment), the problem seems to be related to the app being deleted from the
oauth_applicationsdatabase table.My assumption is that the first time someone on an instance attempts to authenticate with that app, it all works, the app information is stored in the
oauth_applications, and the remote developer stores theuid.Then the user ends up never using that app or removing the authorization from their account "Authorized Apps". This should not delete the app from
oauth_applicationsbecause the remote developer still believes theuidexists.Months later, when that user or another user on the instance attempts to authenticate again, the remote app requests to authenticate with the
uidthey have stored, and the authentication fails with Doorkeeperinvalid_client: "Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method".I have reports of this issue happening with Buffer, Bridgy and elk.zone. I could confirm this issue on a couple of instances that I host and on other instances not hosted by me.
Mastodon instance
Multiple
Mastodon version
v4.2.1