You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sign in with OAuth2 on Windows and Linux through a loopback token callback in the Flutter SDK #2094
Goal: Make OAuth2 sign-in work in the generated Flutter SDK on Windows and Linux, where flutter_web_auth_2 only accepts an http://localhost:{port} callback and createOAuth2Session never returns key/secret to a custom success URL.
What changes:
templates/flutter/lib/src/client_io.dart.twig: on Windows and Linux, webAuth uses the given success URL (or a free loopback port, http://localhost:<port>/) as the callback, sets success and (unless given) failure to it, and for createOAuth2Session opens /account/tokens/oauth2/{provider} and exchanges the returned userId/secret via POST /account/sessions/token. Android, iOS and macOS keep the appwrite-callback-<projectId> flow; saving that session now waits for an in-flight init() and awaits the cookie write.
templates/flutter/test/src/client_io_test.dart.twig (new) and src/SDK/Language/Flutter.php: generate a test covering loopback sign-in, given success/failure URLs and error callbacks on Linux and Windows, plus the Android callback flow.
Remaining steps: None beyond the linked PR. Projects still need a Web platform for localhost so the server accepts the loopback success URL, which is worth mentioning in Flutter SDK docs.
Activity