elk
elk copied to clipboard
Elk does not reset oauth info for servers
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
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.
Start a new pull request in StackBlitz Codeflow.
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.
I can confirm the issue on Iceshrimp
In addition to them, I observed a similar error during the development of Takahẽ server too.
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.
Related: https://github.com/elk-zone/elk/issues/2562