diff --git a/pkgs/oauth2/CHANGELOG.md b/pkgs/oauth2/CHANGELOG.md index ff39de3fb..efc3a3043 100644 --- a/pkgs/oauth2/CHANGELOG.md +++ b/pkgs/oauth2/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.5 + +* Updated README + ## 2.0.4-wip * Require Dart 3.4 diff --git a/pkgs/oauth2/README.md b/pkgs/oauth2/README.md index 07a5976b6..cb9a4b20f 100644 --- a/pkgs/oauth2/README.md +++ b/pkgs/oauth2/README.md @@ -128,7 +128,7 @@ because different options exist for each platform. For Flutter apps, there's two popular approaches: 1. Launch a browser using [url_launcher][] and listen for a redirect using - [uni_links][]. + [app_links][]. ```dart if (await canLaunch(authorizationUrl.toString())) { @@ -136,7 +136,8 @@ For Flutter apps, there's two popular approaches: // ------- 8< ------- - final linksStream = getLinksStream().listen((Uri uri) async { + final appLinks = AppLinks(); + final linksStream = appLinks.uriLinkStream.listen((Uri uri) async { if (uri.toString().startsWith(redirectUrl)) { responseUrl = uri; } @@ -161,6 +162,46 @@ For Flutter apps, there's two popular approaches: ); ``` + +1. To handle redirect on Flutter Web you would need to add a html file to the web folder with some +additional JS code to handle the redirect back to the app (in this example the code will be saved +and passed through localStorage). + + ```html + + +
+ +