elk-zone / elk

A nimble Mastodon web client
https://elk.zone
MIT License
5.5k stars 565 forks source link

Elk does not reset oauth info for servers #2279

Open nileshtrivedi opened 1 year ago

nileshtrivedi commented 1 year ago

I had successfully connected to my gotosocial instance via Elk.zone. Later, my instance switched its datastore backend and therefore, lost the list of authorized clients. When I now try to re-connect to the same instance in elk.zone, GotoSocial shows this error message during the authorization flow:

Bad Request: application for client_id 01J8XF7PP9M7CZ6MH1NV53Y6PX could not be retrieved: If you arrived at this error during a login/oauth flow, please try clearing your session cookies and logging in again; if problems persist, make sure you're using the correct credentials

image

Tusky did not face this error and was able to connect.

Because I had access to the previous data store, I was able to copy the DB record into gotosocial's clients and applications tables and make it work.

I think it's an Elk bug because it seemed to cache the oauth credentials for an instance and is unable to recover if the instance rejects it. Tusky had no issues connecting to the same instance.

stackblitz[bot] commented 1 year ago

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

zotanmew commented 1 year ago

I've faced the same issue with Iceshrimp. It'd be great if Elk would restart the auth flow on every login, or at least after clearing cookies / local storage / site data.

villisek commented 11 months ago

I can confirm the issue on Iceshrimp

shuuji3 commented 10 months ago

In addition to them, I observed a similar error during the development of Takahẽ server too.

blueset commented 7 months ago

Having the same issue on my server where the App ID format changed when I updated it. There should be a way to reset server info when invalid.

tsmethurst commented 7 months ago

Related: https://github.com/elk-zone/elk/issues/2562