Open
Conversation
(cherry picked from commit 6ad8d90)
…entage url encoding to login and logout urls - id token validation - presence of openid scope - code refactoring (cherry picked from commit 5f1b308)
…e as app callback_url - params optional handling (cherry picked from commit fd4b341ba06017c2c6a1ae1d1da36cf3bc20cc49)
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 61 out of 68 changed files in this pull request and generated 12 comments.
Files not reviewed (4)
- .idea/.gitignore: Language not supported
- .idea/auth0-flutter.iml: Language not supported
- .idea/modules.xml: Language not supported
- .idea/vcs.xml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
pmathew92
reviewed
Feb 27, 2026
pmathew92
reviewed
Feb 27, 2026
pmathew92
reviewed
Feb 27, 2026
pmathew92
reviewed
Feb 27, 2026
pmathew92
reviewed
Feb 27, 2026
pmathew92
reviewed
Feb 27, 2026
pmathew92
reviewed
Feb 27, 2026
pmathew92
reviewed
Feb 27, 2026
pmathew92
reviewed
Feb 27, 2026
auth0_flutter/windows/request_handlers/web_auth/login_web_auth_request_handler.cpp
Show resolved
Hide resolved
nandan-bhat
reviewed
Mar 2, 2026
…ground execution (cherry picked from commit 021b6d9)
(cherry picked from commit aeb3f22)
* main: (96 commits) Release af-v2.0.0-beta.5 (#768) fix: Show SSOCredentials (#767) Release af-v2.0.0-beta.4 (#764) chore: Fix RL Scanner pipeline (#763) Release afpi-v2.0.0-beta.4 (#762) chore: fix symlinks (#760) feat: add ssoExchange to AuthenticationApi for Native to Web SSO (#759) build(deps-dev): bump basic-ftp from 5.0.5 to 5.2.0 in /appium-test (#751) build(deps): bump actions/download-artifact from 7.0.0 to 8.0.0 (#754) build(deps): bump actions/upload-artifact from 6 to 7 in /.github/actions/unit-tests-darwin (#755) build(deps): bump nokogiri from 1.18.9 to 1.19.1 in /auth0_flutter/example/ios (#747) feat: Implement Native to Web (#749) build(deps): bump actions/upload-artifact from 6 to 7 (#753) build(deps): bump actions/upload-artifact from 6 to 7 in /.github/actions/smoke-tests-darwin (#756) build(deps): bump minimatch in /appium-test (#757) build(deps): bump fast-xml-parser and edgedriver in /appium-test (#758) chore: Removed PR analyzer (#752) build(deps): bump aws-actions/configure-aws-credentials from 5.1.1 to 6.0.0 in /.github/actions/rl-scanner (#744) chore: updated the RL wrapper installation path (#746) Release af-v2.0.0-beta.3 (#743) ...
NandanPrabhu
commented
Mar 10, 2026
NandanPrabhu
commented
Mar 10, 2026
NandanPrabhu
commented
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Changes
This PR adds native Windows desktop support to the
auth0_flutterSDK, enabling Auth0 Universal Login on Flutter Windows apps using the OAuth 2.0 Authorization Code Flow with PKCE. The implementation is a C++ Flutter plugin that integrates with the existing platform-interface layer without modifying the mobile (iOS/Android) code paths.New:
WindowsWebAuthenticationclassA dedicated Windows authentication class exposed via
Auth0.windowsWebAuthentication(). Unlike the mobileWebAuthenticationclass, this:redirectUrlexplicitly (no platform default exists on Windows)CredentialsManager(no Keychain/Keystore on Windows)parametersmap for Windows-specific configurationauthTimeoutSeconds(default'180'): How long the plugin polls for the OAuth callback before returningUSER_CANCELLED. Increase for slow MFA flows; decrease for fast failure in tests.New: Windows C++ plugin (
auth0_flutter/windows/)login_web_auth_request_handler.cpplogout_web_auth_request_handler.cppoauth_helpers.cppauth0flutter://callback pollingauth0_client.cppid_token_validator.cppid_token_signature_validator.cppjwt_util.cpptoken_decoder.cppCredentialsstructuser_profile.cpp/user_identity.cppUserProfilestructtime_util.cppurl_utils.cppwindows_utils.cppWideToUtf8,BringFlutterWindowToFrontAuthentication flow:
code_verifier(32 cryptographically random bytes viaRAND_bytes) andcode_challenge(SHA-256 via OpenSSL, base64-URL encoded)statevalue for CSRF protection/authorizeURL with all parameters RFC 3986-encodedShellExecuteAPLUGIN_STARTUP_URLenvironment variable (set by Windows when the app is launched via theauth0flutter://custom scheme) every 200 ms until the callback arrives or the timeout expiresstateto prevent CSRF; extractcodecode+code_verifierfor tokens via POST to/oauth/tokenauth_time, nonce, RS256 signature)Key design decisions:
auth0flutter://callback(kDefaultRedirectUri). TheredirectUrlsent to Auth0 may differ (e.g. an HTTPS intermediary server URL); that server is responsible for forwarding toauth0flutter://callback?code=…&state=….authTimeoutSeconds) are consumed before building the authorize URL and are not appended to it.std::threadto avoid blocking the Flutter UI thread.openidscope is always enforced even when not explicitly passed, as required by OpenID Connect.New:
vcpkg.jsondependency manifestManages C++ dependencies via vcpkg, integrating automatically with CMake through the vcpkg toolchain file set by Flutter during
flutter build windows:cpprestsdkopensslRAND_bytes(PKCE entropy), SHA-256 (code challenge), RS256 signature verification, TLSboost-system/boost-date-time/boost-regexNew: Unit tests (Google Test,
auth0_flutter/windows/test/)oauth_helpers_test.cppid_token_validator_test.cppauth_time, nonce, leeway validationjwt_util_test.cpptime_util_test.cpptoken_decoder_test.cppurl_utils_test.cppuser_identity_test.cppuser_profile_test.cppwindows_utils_test.cppWideToUtf8wide-to-UTF-8 conversionTests are compiled as a separate
auth0_flutter_testsexecutable and registered with CTest, enabled via-DAUTH0_FLUTTER_ENABLE_TESTS=ON.New: CI pipeline (
.github/workflows/main.yml)Added a
windows-testsjob that installs vcpkg dependencies, builds the test executable with CMake, and runs all C++ unit tests via CTest onwindows-latest.📎 References
🎯 Testing
Automated — C++ unit tests (Windows)
All 9 test suites pass.
Automated — Flutter unit tests (any platform)
Manual — end-to-end on Windows
Prerequisites:
auth0flutteras a custom URL scheme pointing to your app executable (via installer or registry)auth0flutter://callbackto Allowed Callback URLs in the Auth0 dashboardcd auth0_flutter/example flutter run -d windowsauth0flutter://callback?code=…&state=…To test the intermediary server pattern, point
redirectUrlat an HTTPS endpoint that reads thecodeandstatequery parameters and responds with a redirect toauth0flutter://callback?code=…&state=….