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

feat: use entered email for old flow when new is not supported [WPB-16058] #3905

Conversation

saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Mar 6, 2025

TaskWPB-16058 [Android] Create login flow selector


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Pass email when navigating to the old login flow when the app uses server config that doesn't support v8 so that the user won't have to enter it twice. It's done by returning email in EnterpriseLoginNotSupported action and then passing it as a navigation parameter. LoginNavArgs.userHandle was changed to become PreFilledUserIdentifierType.PreFilled and a new field editable was added to that class so that it can be decided when navigating whether email field should be enabled for editing or pre-filled without the option to edit it.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Use the deep link to switch backend to the one that doesn't yet support enterprise login and v8 (staging for instance) and with the login-type=new parameter. It should make it so that when you try to log in, the app will return EnterpriseLoginNotSupported because it's not supported on this backend yet, so it should navigate to the old flow with email field already filled in but also able to be edited.

Attachments (Optional)

newlogin_not_supported.mp4

PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

saleniuk added 3 commits March 6, 2025 16:58
…flow' into feat/newlogin-fix-navigation-when-enterprise-not-supported

# Conflicts:
#	app/src/main/kotlin/com/wire/android/ui/newauthentication/login/NewLoginViewModel.kt
@saleniuk saleniuk requested review from a team, yamilmedina, alexandreferris, MohamadJaara, vitorhugods and emmaoke-w and removed request for a team March 6, 2025 16:16
Copy link

sonarqubecloud bot commented Mar 6, 2025

@saleniuk saleniuk requested review from a team, typfel and Garzas and removed request for alexandreferris, emmaoke-w, a team and typfel March 6, 2025 16:19
@saleniuk saleniuk merged commit 2163fa7 into epic/new-sso-login-flow Mar 10, 2025
7 of 8 checks passed
@saleniuk saleniuk deleted the feat/newlogin-fix-navigation-when-enterprise-not-supported branch March 10, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants