element-hq / element-hq/matrix-authentication-service
Using a prompt mode of `create` signs you in if there is already a session.
- Dominant language
- Rust
- Stars
- 280
- Forks
- 111
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 25
Description
**Describe the bug**
When opening the authentication URL and passing `create` as the prompt from Element X, if there is already a session in the browser, then instead of asking you if you want to sign out (probably the expected screen when I think about it) or to consent, the authentication completes immediately, signing you in to the app.
**To Reproduce**
- Login to an account on matrix.org in EX (with a modified build that passes `.create` [here](https://github.com/element-hq/element-x-ios/blob/d158e256dbaa33c59d2408dcc8ba476010380c94/ElementX/Sources/Services/Authentication/AuthenticationService.swift#L88-L91)).
- Sign out of that account.
- Attempt to create another account on matrix.org.
**Expected behavior**
To be asked to sign out in the web view so that you can create a new account.
**Screenshots**
_Note: Creating an account in this recording is unnecessary. It also happens with a simple login._
https://github.com/user-attachments/assets/e43e984d-1be2-42fc-9597-abfc361a3cce
**Smartphone (please complete the following information):**
- Device: iPhone 12
- OS: iOS 18
- App: Element X 1.9.3
Contributor guide
Assessment
This issue has not been assessed yet.