Yarn had somehow confused itself and got into a state where it refused
to install react 19.2.4, so much so that even renovate thought it had
upgraded the package (https://github.com/element-hq/element-modules/pull/208)
when it hadn't.
Until we switch to pnom and can use catalog:, pin them to exact version which
seems to make yarn play ball again.
All modules now use e2e/ for playwright tests, consistent with
element-modules-private. This avoids conflicts between vitest (which
uses tests/) and playwright project discovery.
Add a new container that both:
- Spins up a MAS instance.
- Loads the restricted guests module into Synapse, and configures it
accordingly.
Then extend restricted guests spec to include MAS tests.
This requires setting up MAS' config to recognise the module as an
automated client (so that it can request Admin perms to
create/deactivate users).
To allow supplying the `client_secret` in a file, instead of directly in the configuration. I've found that ESS prefer this method in the past, so the entire config does not need to be a secret.
To deactivate users, we need their `actor_user_id` (MAS-specific). I don't believe there's a way to get this from Synapse. So, we store user's detailed in a namespaced table upon registering them, along with the creation timestamp, and deactivate them once they're considered expired.
In order to get an access token for a user, one needs to create a personal session on MAS.
We now do so, and extract the access token and device ID from the response.
TODO: We're handing back the MAS user ID as the device ID. Is that correct?
In order to create and manage users with MAS enabled, we'll need to
reach out to the MAS admin API. We can do so automatically by requesting
an admin-enabled token, assuming a matching client has been configured
on the MAS side.
Add some config options for the guest module (OAuth2 client) side.