Skip to content

docs(flutter): explain that native OAuth2 must use the default redirect - #13976

Merged
HarshMN2345 merged 4 commits into
mainfrom
docs/flutter-oauth-redirects
Sep 29, 2026
Merged

HarshMN2345 merged 4 commits into
mainfrom
docs/flutter-oauth-redirects

Conversation

@HarshMN2345

Copy link
Copy Markdown
Member

On Android, iOS and macOS the Flutter SDK only listens for the appwrite-callback-[PROJECT_ID] scheme. The server also only adds the session key and secret to the default success redirect. So passing a custom success URL like an https App Link to createOAuth2Session fails with PlatformException(CANCELED) or an invalid OAuth2 response, even though the login went through. This adds a short note after the Android manifest setup in the Flutter getting started guide, which is where the SDK README comes from. It tells readers to leave out success and failure and to navigate from Dart once the Future completes.

Fixes #3142

On Android, iOS and macOS the Flutter SDK only listens for the
appwrite-callback-[PROJECT_ID] scheme, and the server only adds the
session key and secret to the default success redirect. A custom
success URL such as an https App Link therefore ends the login with
PlatformException(CANCELED) or an invalid OAuth2 response even though
the session was created. Tell readers to omit success and failure and
navigate after the Future completes.
@ghost

ghost commented Sep 29, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The latest change only repositions the existing guidance and introduces no issue that needs fixing.

Adds Flutter getting-started guidance for native OAuth2 redirects. The note explains why custom success URLs can leave the SDK waiting for its callback and advises navigating from Dart after the authentication Future completes. The latest commit moves the note above the platform-specific setup so it applies clearly to Android, iOS, and macOS.

Latest changes: Moved the existing native OAuth2 redirect note from beneath the Android manifest example to the start of the Flutter platform setup section.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 1
File Change
docs/sdks/flutter/GETTING_STARTED.md Adds native OAuth2 redirect guidance and positions it before the platform-specific setup instructions.

Reviewed the commits since bd04773 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Tier S · Looks good to merge. Summary

@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Low risk] Adds clarification to the Flutter SDK setup guide.

The PR appears safe to merge.

Summary

The PR moves the Flutter native OAuth2 redirect guidance above the platform-specific setup sections, making it visible to Android, iOS, and macOS readers.

Reviews (2) · Last reviewed commit: "Merge remote-tracking branch 'origin/doc..."

Comment thread docs/sdks/flutter/GETTING_STARTED.md Resolved
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → docs/flutter-oauth-redirects (after).

Metric Before After Change
🚀 Requests/sec 193.13 191.61 ⚪ -0.8%
⏱️ Latency P50 89.98 ms 89.8 ms ⚪ -0.2%
⏱️ Latency P95 210.99 ms 211.41 ms ⚪ +0.2%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 89.8 211.41 12,141 191.61 +0.42
Account 170.47 335.39 639 10.6 -3.41
TablesDB 86.89 169.89 6,603 107.19 +2.84
Storage 80.8 176.77 3,195 53.22 +3.85
Functions 123.19 255.89 1,704 28.95 +3.39

Top API waits (after)

API request Max wait (ms)
account.name.update 573.73
functions.variables.update 512.61
account.prefs.update 482.21
functions.delete 423.21
functions.variables.create 417.15

@HarshMN2345
HarshMN2345 merged commit 03bf54e into main Sep 29, 2026
10 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: [FLUTTER] Appwrite OAuth2.0 api detects app link redirects as user canceling action by throwing PlatformException(User Canceled Login)

1 participant