-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Right now the API assumes every user calling it has an account on the same instance where Flair is running, and automatically polls localhost or the lemmy address on the docker-compose network. This is, however, often not the case.
This issue is part of a larger effort to add Federation support to Flair.
Flair needs to know where it is
A new environment variable should save the domain of the Flair server. The presence of this variable should be mandatory.
The variable should be preserved and passed down to the verify_user and verify_mod functions through the AppState struct.
It should know it, by knowing where it isn't
Users from instances different than the local one should be verified with a query to their own instance.
The "verify" handlers should extract the instance domain from the actor_id, match it with the aforementioned environment variable and, if necessary, poll the remote instance instead.