Skip to content

[MOB-4154] Sign In behaviour fix#1046

Merged
d4r1091 merged 5 commits intomainfrom
dc-mob-4154-sign-in-behaviour-fix
Feb 22, 2026
Merged

[MOB-4154] Sign In behaviour fix#1046
d4r1091 merged 5 commits intomainfrom
dc-mob-4154-sign-in-behaviour-fix

Conversation

@d4r1091
Copy link
Copy Markdown
Member

@d4r1091 d4r1091 commented Feb 19, 2026

MOB-4154

Context

Previously, a workaround was implemented in EcosiaWebViewModal to intercept sign-in URLs and redirect them, ensuring users always appeared logged in. This approach led to inconsistencies between the sign-in and sign-up flows when Web started to implement the Sign In button. However, after a fix from JOU (including some Terraform changes), we managed to consistently get the refresh token, so we no longer need the workaround and make the interceptor open the native Auth0 page for both Sign-In and Sign-Up.

Approach

  • Remove the workaround for the Sign-In
  • Make the Sign-In handle the Auth0 native page opening

Other

Before merging

Checklist

  • I performed some relevant testing on a real device and/or simulator for both iPhone and iPad
  • I made sure that any change to the Analytics events included in PR won't alter current analytics (e.g. new users, upgrading users)

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes a workaround that was previously intercepting sign-in URLs and redirecting them to make users appear logged in. With backend fixes in place (JOU team changes including Terraform updates), the refresh token is now consistently retrieved. Both sign-in and sign-up flows now use the same native Auth0 authentication flow.

Changes:

  • Removed sign-in URL interception logic from EcosiaWebViewModal that was redirecting to a modified URL
  • Unified sign-in and sign-up handling in BrowserViewController+Ecosia to use the same native Auth0 flow
  • Enabled AI Search feature unconditionally for iOS 16+ (appears unrelated to the PR's stated purpose)

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
firefox-ios/Ecosia/UI/Account/EcosiaWebViewModal.swift Removed the sign-in URL interceptor that was redirecting URLs with returnTo parameter
firefox-ios/Client/Ecosia/Extensions/BrowserViewController+Ecosia.swift Unified sign-in and sign-up handling into a single method, removed separate sign-in redirection logic
firefox-ios/Client/Ecosia/UI/NTP/Header/NTPHeaderViewModel.swift Changed AI Search feature flag from experiment-based to always enabled for iOS 16+

var isEnabled: Bool {
if #available(iOS 16.0, *) {
return AISearchMVPExperiment.isEnabled
return true
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

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

This change from AISearchMVPExperiment.isEnabled to true appears unrelated to the PR's stated purpose of fixing sign-in behavior. This change enables AI Search functionality unconditionally (for iOS 16+), which seems to be a separate feature rollout.

If this is intentional and part of this PR, it should be mentioned in the PR description. Otherwise, this change should be moved to a separate PR focused on the AI Search feature rollout.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That's a good question, can you elaborate on what has changed here? I guess since the header has accounts we want to always show it and the AI condition is now inside the view, right?

What about the iOS 16 condition?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That is correct @lucaschifino on the assumption. I would say that was a bug. The Account one was depending on the AISearchMVPExperiment flag. Both SwiftUI under the same "wrapper".
Considering the AI button visibility being covered already by the

if AISearchMVPExperiment.isEnabled {
, I thought that now that isEnabled flag would only depend on the iOS16 (SwiftUI).

Comment thread firefox-ios/Client/Ecosia/Extensions/BrowserViewController+Ecosia.swift Outdated
Copy link
Copy Markdown
Collaborator

@lucaschifino lucaschifino left a comment

Choose a reason for hiding this comment

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

All good 🟢

var isEnabled: Bool {
if #available(iOS 16.0, *) {
return AISearchMVPExperiment.isEnabled
return true
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That's a good question, can you elaborate on what has changed here? I guess since the header has accounts we want to always show it and the AI condition is now inside the view, right?

What about the iOS 16 condition?

…sia.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@d4r1091 d4r1091 merged commit 886e742 into main Feb 22, 2026
3 of 4 checks passed
@d4r1091 d4r1091 deleted the dc-mob-4154-sign-in-behaviour-fix branch February 22, 2026 19:11
d4r1091 added a commit that referenced this pull request Mar 2, 2026
* [MOB-4154] Add logs

* [MOB-4154] Enable accounts by default

* [MOB-4154] Revert "[MOB-4154] Add logs"

This reverts commit af489be.

* [MOB-4154] Remove SignIn workaround. Intercept SignIn

* Update firefox-ios/Client/Ecosia/Extensions/BrowserViewController+Ecosia.swift

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
# Conflicts:
#	firefox-ios/Client/Ecosia/Extensions/BrowserViewController+Ecosia.swift
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.

3 participants