If an attempt to puppet the user on the Matrix side fails, the bridge should try to re-login with the shared secret method if possible. This allows recovering from the user changing their password, or just removing the bridge's session.
The required changes are presumably in UserSynchroniser.getClientFromTokenCallback() to handle the homeserver returning an M_UNKNOWN_TOKEN error.
If an attempt to puppet the user on the Matrix side fails, the bridge should try to re-login with the shared secret method if possible. This allows recovering from the user changing their password, or just removing the bridge's session.
The required changes are presumably in UserSynchroniser.getClientFromTokenCallback() to handle the homeserver returning an M_UNKNOWN_TOKEN error.