Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoftLogout UX is broken if the homeserver supports both password and SSO #5311

Closed
bmarty opened this issue Feb 22, 2022 · 1 comment · Fixed by #5398
Closed

SoftLogout UX is broken if the homeserver supports both password and SSO #5311

bmarty opened this issue Feb 22, 2022 · 1 comment · Fixed by #5398
Assignees
Labels
A-Soft-Logout O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems

Comments

@bmarty
Copy link
Member

bmarty commented Feb 22, 2022

SoftLogout UX is broken if the homeserver supports both password and SSO like for instance matrix.org.

Mainly because this block is empty:

is LoginMode.SsoAndPassword -> {
}

https://github.com/vector-im/element-android/blob/develop/vector/src/main/java/im/vector/app/features/signout/soft/SoftLogoutController.kt#L125

In this case, the app should display the password form, if the user has created the session using a password. If SSO was used, a message like "Please clear data and log in again to your account" can be displayed.

The fact that the user has created the session using a password is not stored. This info can be stored in the SessionParamsEntity as a nullable boolean. A database migration will be required.

  • boolean is null (we do not have the info) -> Display the password form and a message like "If you have signed in using an account from another provider, please clear data and log in again to your account"
  • boolean is true or false: see above

Simulating a soft logout can be done by adding this line:

globalErrorReceiver.handleGlobalError(GlobalError.InvalidToken(softLogout = true))

here (for instance)

Critical because the user cannot recover their session in case of soft logout.

@bmarty bmarty added T-Defect Something isn't working: bugs, crashes, hangs and other reported problems A-Soft-Logout S-Critical Prevents work, causes data loss and/or has no workaround O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Feb 22, 2022
@langleyd
Copy link
Member

Duplicate of #5192, whichever one you want to keep open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Soft-Logout O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Something isn't working: bugs, crashes, hangs and other reported problems
Projects
None yet
3 participants