element-hq / element-hq/element-x-android
Feature Request / Bug: Seamless SSO workflow (via WordPress/OIDC) is broken in Element X for embedded environments
- Dominant language
- Kotlin
- Stars
- 2.4k
- Forks
- 624
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 149
Description
### Your use case
**Describe the bug / feature request**
I am running a custom community application where WordPress acts as the central Identity Provider (SSO). My goal is to provide a seamless user journey where users log into my main app, and the chat opens automatically authenticated.
With older setups (Element Web / older clients), we had a perfectly working workflow:
User logs into the native app/wrapper.
App requests an auto-login token (Magic Link) from WordPress.
The WebView opens the link, silently authenticating the browser session in WordPress.
WordPress immediately redirects to the Matrix SSO login endpoint.
Matrix recognizes the active WordPress session, authenticates the user, and opens the chat seamlessly.
**The Problem with Element X**
This established, seamless SSO workflow no longer works with Element X. When trying to integrate Element X or handle the SSO handoff within an embedded environment (WebView / Custom App Wrapper), the flow is severely disrupted.
Element X either fails to handle the WebView authentication state correctly, forces users out of the seamless flow, or aggressively intercepts the routing with mobile app promotions/warnings that cannot be disabled. The transition from our custom Identity Provider (WordPress) to Element X is no longer frictionless.
**Describe the solution you'd like**
We need official support for seamless SSO authentication flows in embedded environments for Element X.
Specifically:
Allow Element X to reliably handle external SSO redirects (like WordPress) within WebViews or custom app wrappers without breaking the session.
Provide a strict configuration flag (e.g., "embedded_mode": true) that completely disables any mobile app install prompts, "unsupported browser" warnings, or welcome screens that interrupt the SSO redirect chain.
**Why this matters**
WordPress is one of the most common central identity providers for self-hosted communities. Breaking the ability to seamlessly bridge authentication between a main app and the chat forces users to manually log in multiple times, which degrades the user experience significantly. Supporting a smooth SSO handoff is crucial for community builders integrating Matrix/Element X into their ecosystems.
Additional context
Any guidance on how to restore the seamless SSO workflow with Element X, or adding native support for these embedded integration cases, would be highly appreciated by the self-hosting and developer community. Thank you!
### Have you considered any alternatives?
Currently, the only alternative is to rely on the "Element Classic" app, where this seamless SSO workflow still functions perfectly. However, this is not a viable long-term solution. New users are no longer suggested or directed to download the Classic app; instead, the official onboarding and app stores actively push them towards Element X. Because Element X breaks this flow, the onboarding experience for all newly registered users in our community is currently broken.
### Additional context
Note: Please excuse if some phrasing sounds a bit artificial. I used an AI to help translate and formulate this issue clearly, as my native language is not English. I hope the core technical problem is still fully understandable!
### Are you willing to provide a PR?
No
Contributor guide
Assessment
This issue has not been assessed yet.