Skip to content

Conversation

@M4dhav
Copy link
Contributor

@M4dhav M4dhav commented Nov 13, 2025

What does this PR do?

This PR Upgrades the flutter_web_auth_2 dependency in the Flutter SDK. This fixes an issue with the library which caused OAuth 2.0 Browser Popups to return successfully but never close and stay on the foreground. This caused the app to be logged in but the Popup stayed in place.

Test Plan

I verified this to be the fix for the Popup issue by using flutter_web_auth_2: ^5.0.0-alpha.3 as a dependency override in my app. Nothing else had been working to fix the issue, and this was the only thing that did.

Related PRs and Issues

Resolves appwrite/sdk-for-flutter#285
More Information about the Issue can be found in the Discord Thread: https://discord.com/channels/564160730845151244/1438491539797049418

Have you read the Contributing Guidelines on issues?

yes

Summary by CodeRabbit

  • Chores
    • Updated Flutter web authentication library dependency to a pre-release version.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 13, 2025

Walkthrough

The pull request updates the flutter_web_auth_2 dependency version constraint in the Flutter template pubspec configuration file from ^4.1.0 to ^5.0.0-alpha.3. This is a single dependency version bump with no modifications to other configuration values, dependencies, or control flow logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single configuration file modified with a straightforward dependency version update
  • No code logic changes or structural modifications
  • Consider verifying that the pre-release version (alpha.3) is intentional rather than an accidental use of an unstable release

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the fix being implemented - upgrading flutter_web_auth_2 to resolve the OAuth 2 browser popup closure issue.
Linked Issues check ✅ Passed The dependency upgrade to flutter_web_auth_2 ^5.0.0-alpha.3 directly addresses the bug in issue #285 where OAuth popups failed to close after successful authentication.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to upgrading a single dependency version, directly related to resolving the popup closure bug and contains no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50fd27e and a835a4b.

📒 Files selected for processing (1)
  • templates/flutter/pubspec.yaml.twig (1 hunks)
🔇 Additional comments (1)
templates/flutter/pubspec.yaml.twig (1)

23-23: Stable version 5.x does not exist; alpha is the only 5.x option. Verify breaking changes are acceptable before merging.

The verification confirms:

  • No stable 5.x releases exist; 4.1.0 is the latest stable version
  • No security vulnerabilities reported
  • Breaking changes in 5.0.0 include new Android authentication, Swift Package Manager migration for iOS/macOS, and tooling updates requiring newer Dart/Flutter versions

Before proceeding, verify:

  • Is the OAuth popup bug critical enough to justify alpha adoption and breaking changes for all SDK users?
  • Have you reviewed the migration guide for the three breaking changes and confirmed compatibility with your supported SDK versions?
  • Should SDK users remain on 4.1.0 stable instead, deferring this change until a stable 5.x releases?

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@DH-555 DH-555 requested review from ChiragAgg5k and Copilot and removed request for ChiragAgg5k November 13, 2025 15:56
Copilot finished reviewing on behalf of DH-555 November 13, 2025 15:57
Copy link
Contributor

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 upgrades the flutter_web_auth_2 dependency from version ^4.1.0 to ^5.0.0-alpha.3 to fix a critical issue where OAuth 2.0 browser popups successfully authenticate but fail to close, leaving them in the foreground and blocking the user interface.

Key changes:

  • Dependency version bump from ^4.1.0 to ^5.0.0-alpha.3 for flutter_web_auth_2

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

cookie_jar: ^4.0.8
device_info_plus: '>=11.5.0 <13.0.0'
flutter_web_auth_2: ^4.1.0
flutter_web_auth_2: ^5.0.0-alpha.3
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

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

Using an alpha pre-release version (^5.0.0-alpha.3) in production dependencies is risky and goes against best practices. Alpha versions are unstable, may contain bugs, and can introduce breaking changes without notice. Consider waiting for a stable 5.0.0 release or contact the flutter_web_auth_2 maintainers to expedite a stable release that includes the popup fix. If the alpha version must be used temporarily, add a comment explaining this is a temporary workaround and create a tracking issue to update to the stable version once released.

Suggested change
flutter_web_auth_2: ^5.0.0-alpha.3
# TEMPORARY: Using alpha version for popup fix. See https://github.com/appwrite/sdk-generator/issues/XXXX
flutter_web_auth_2: ^4.0.4

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

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

100% needed in this case. Better to have it working but unstable rather than not working 😅

Copy link
Member

@DH-555 DH-555 left a comment

Choose a reason for hiding this comment

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

I have manually tested this. Works fine in both dev and production.

@ChiragAgg5k ChiragAgg5k merged commit 991858e into appwrite:master Nov 17, 2025
58 checks passed
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.

🐛 Bug Report: OAuth Browser Popup doesn't close even after successful login

3 participants