elk icon indicating copy to clipboard operation
elk copied to clipboard

Elk does not reset oauth info for servers

Open nileshtrivedi opened this issue 1 year ago • 6 comments

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.

nileshtrivedi avatar Jul 29 '23 08:07 nileshtrivedi

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

stackblitz[bot] avatar Jul 29 '23 08:07 stackblitz[bot]

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.

zotanmew avatar Oct 06 '23 21:10 zotanmew

I can confirm the issue on Iceshrimp

villisek avatar Dec 22 '23 13:12 villisek

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

shuuji3 avatar Dec 25 '23 04:12 shuuji3

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.

blueset avatar Mar 24 '24 16:03 blueset

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

tsmethurst avatar Apr 17 '24 10:04 tsmethurst