diff --git a/CHANGELOG.md b/CHANGELOG.md index 377ac69..84226c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log -## 16.0.1 +## 17.0.0 + +* Update `flutter_web_auth_2` dependency to version 4.1.0 +* Update `auth.html` example in README.md to align with `flutter_web_auth_2` documentation +* Breaking changes: + * Minimum iOS version supported is now 17.4 due to the updated requirements of `flutter_web_auth_2` version 4.1.0 + +## 16.1.0 * Add `setDevKey` method to Client service * Add `upsertDocument` method to Databases service diff --git a/README.md b/README.md index b8d7069..516536e 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file: ```yml dependencies: - appwrite: ^16.1.0 + appwrite: ^17.0.0 ``` You can install packages from the command line: @@ -89,13 +89,25 @@ For web in order to capture the OAuth2 callback URL and send it to the applicati ```html Authentication complete -

Authentication is complete. If this does not happen automatically, please -close the window. +

Authentication is complete. If this does not happen automatically, please close the window.

``` diff --git a/lib/src/client_browser.dart b/lib/src/client_browser.dart index 2f4a1fc..6a1b624 100644 --- a/lib/src/client_browser.dart +++ b/lib/src/client_browser.dart @@ -40,7 +40,7 @@ class ClientBrowser extends ClientBase with ClientMixin { 'x-sdk-name': 'Flutter', 'x-sdk-platform': 'client', 'x-sdk-language': 'flutter', - 'x-sdk-version': '16.1.0', + 'x-sdk-version': '17.0.0', 'X-Appwrite-Response-Format': '1.7.0', }; @@ -260,6 +260,7 @@ class ClientBrowser extends ClientBase with ClientMixin { return FlutterWebAuth2.authenticate( url: url.toString(), callbackUrlScheme: "appwrite-callback-" + config['project']!, + options: const FlutterWebAuth2Options(useWebview: false), ); } } diff --git a/lib/src/client_io.dart b/lib/src/client_io.dart index cd18163..676caac 100644 --- a/lib/src/client_io.dart +++ b/lib/src/client_io.dart @@ -58,7 +58,7 @@ class ClientIO extends ClientBase with ClientMixin { 'x-sdk-name': 'Flutter', 'x-sdk-platform': 'client', 'x-sdk-language': 'flutter', - 'x-sdk-version': '16.1.0', + 'x-sdk-version': '17.0.0', 'X-Appwrite-Response-Format': '1.7.0', }; @@ -359,7 +359,10 @@ class ClientIO extends ClientBase with ClientMixin { callbackUrlScheme: callbackUrlScheme != null && _customSchemeAllowed ? callbackUrlScheme : "appwrite-callback-" + config['project']!, - options: const FlutterWebAuth2Options(intentFlags: ephemeralIntentFlags), + options: const FlutterWebAuth2Options( + intentFlags: ephemeralIntentFlags, + useWebview: false, + ), ).then((value) async { Uri url = Uri.parse(value); final key = url.queryParameters['key']; diff --git a/pubspec.yaml b/pubspec.yaml index 5ccf2f9..13b9b15 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: appwrite -version: 16.1.0 +version: 17.0.0 description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API homepage: https://appwrite.io repository: https://github.com/appwrite/sdk-for-flutter @@ -20,7 +20,7 @@ dependencies: sdk: flutter cookie_jar: ^4.0.8 device_info_plus: ^10.1.2 - flutter_web_auth_2: ^3.1.2 + flutter_web_auth_2: ^4.1.0 http: '>=0.13.6 <2.0.0' package_info_plus: ^8.0.2 path_provider: ^2.1.4