Skip to content

Conversation

@David-Henner
Copy link
Contributor

@David-Henner David-Henner commented Jan 2, 2026

BugWPB-22220 [iOS] [Core] - Multibackend - When session gets terminated - App asks for password in SSO scenario

Issue

When their session expires and they need to re-authenticate, users that have an email address registered and use SSO are presented with the email / password authentication flow instead of the SSO authentication flow.

Cause

LoginCredentials has a property hasPassword that is used to determine whether to use SSO or email & password authentication. However, this property is set to email != nil. But some SSO users may have an email address, so it isn't accurate to assume that having an email necessarily means the user relies on email + password authentication.

Solution

Remove the hasPassword property and rely on the existing usesCompanyLogin (translates to usesSSO) to check whether the user should authenticate via SSO

Testing

  • Have an SSO user with an email saved
  • Log in
  • Expire cookie
  • Re-authenticate

The app should redirect to the SSO authentication flow


Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit cbdbdc0.

Copy link
Contributor

@samwyndham samwyndham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I was trying to understand what was the purpose of even having this hasPassword field. As far as I can tell, it seems safe to remove it.

import WireCountly
import WireDataModel
import WireFoundation
import WireLogging
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Did you want to add some logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants