-
Notifications
You must be signed in to change notification settings - Fork 194
Description
Steps to reproduce
When attempting to log in through Element X iOS to my Matrix homeserver, I'm encountering an error in the Matrix Authentication Service (MAS) logs indicating that the client registration is being denied due to missing contacts information.
In the Element X source code, it appears that the contacts field is properly set in the OIDC configuration (via supportEmailAddress
), but in the actual registration request being sent, the contacts field is coming through as None
.
Steps to reproduce
- Configure a Matrix homeserver with Matrix Authentication Service
- Attempt to log in with Element X iOS app version 25.04.3
- Check MAS logs to see the error
Logs/Error Messages
From the MAS logs:
2025-04-22T09:05:27.917081Z ERROR http.server.request{otel.kind="server" otel.name="POST /auth/oauth2/registration" network.protocol.name="http" network.protocol.version="1.1" http.request.method="POST" url.path="/auth/oauth2/registration" url.scheme="http" http.route="/auth/oauth2/registration" user_agent.original="Element X/25.04.3 (iPhone 12; iOS 18.3.2; Scale/3.00)"}:handlers.oauth2.registration.post: mas_handlers::oauth2::registration: crates/handlers/src/oauth2/registration.rs:182: error=denied by the policy: [Violation { msg: "missing contacts", field: None }]
In the log details, I can see the client metadata where the contacts field is None:
Client registration body=ClientMetadata { redirect_uris: Some([Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("element.io")), port: None, path: "/oidc/login", query: None, fragment: None }]), ..., contacts: None, client_name: Some(Localized { non_localized: "Element X", localized: {} }), ... }
However, in the Element X iOS source code, contacts are being set, it seems?
private(set) lazy var oidcConfiguration = OIDCConfigurationProxy(clientName: InfoPlistReader.main.bundleDisplayName,
redirectURI: oidcRedirectURL,
clientURI: websiteURL,
logoURI: logoURL,
tosURI: acceptableUseURL,
policyURI: privacyURL,
contacts: [supportEmailAddress],
staticRegistrations: oidcStaticRegistrations.mapKeys { $0.absoluteString })
Outcome
What did you expect?
Able to sign in to my account on my homeserver.
What happened instead?
An error message pops up, "Sorry, an error occurred", with the aforementioned logs.
Your phone model
iPhone 12
Operating system version
18.3.2
Application version
25.04.3
Homeserver
No response
Will you send logs?
Yes