Open tulir opened 1 year ago
That does sound quite confusing!
It looks like the clause around here is incorrect:
My hunch is that we just should remove that special clause since the is_interested_in_user
checks the same thing internally. And you do still need the user to be registered to use it?
Using the as_token directly for other endpoints does mostly work without /registering, so theoretically some appservices may be relying on that if they just don't use appservice /login.
I don't see anything in the spec saying whether calling /register for the sender_localpart should be required or not. If it turns out that it isn't required, then Synapse should probably auto-register the sender_localpart on startup, so all endpoints work properly. Either way the special case can be removed.
Description
The appservice login mechanism seems to allow logging in as the
sender_localpart
user, even if the user doesn't exist. The result is extremely confusing, as the login will return a success with an access token, but trying to use the access token will just throwM_UNKNOWN_TOKEN
. Doing the same with a namespace user rather than the sender_localpart will throw "Application service has not registered this user" in the login call.Steps to reproduce
sender_localpart
user and receive a token backM_UNKNOWN_TOKEN
Synapse Version
1.92.0rc1
Database
PostgreSQL
Workers
Single process
Relevant log output