File tree 5 files changed +36
-13
lines changed 5 files changed +36
-13
lines changed Original file line number Diff line number Diff line change 1
1
# Change Log
2
2
3
- ## 16.0.1
3
+ ## 17.0.0
4
+
5
+ * Update ` flutter_web_auth_2 ` dependency to version 4.1.0
6
+ * Update ` auth.html ` example in README.md to align with ` flutter_web_auth_2 ` documentation
7
+ * Breaking changes:
8
+ * Minimum iOS version supported is now 17.4 due to the updated requirements of ` flutter_web_auth_2 ` version 4.1.0
9
+
10
+ ## 16.1.0
4
11
5
12
* Add ` setDevKey ` method to Client service
6
13
* Add ` upsertDocument ` method to Databases service
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Add this to your package's `pubspec.yaml` file:
21
21
22
22
``` yml
23
23
dependencies :
24
- appwrite : ^16.1 .0
24
+ appwrite : ^17.0 .0
25
25
` ` `
26
26
27
27
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
89
89
``` html
90
90
<!DOCTYPE html>
91
91
<title >Authentication complete</title >
92
- <p >Authentication is complete. If this does not happen automatically, please
93
- close the window.
92
+ <p >Authentication is complete. If this does not happen automatically, please close the window.</p >
94
93
<script >
95
- window .opener .postMessage ({
96
- ' flutter-web-auth-2' : window .location .href
97
- }, window .location .origin );
98
- window .close ();
94
+ function postAuthenticationMessage () {
95
+ const message = {
96
+ ' flutter-web-auth-2' : window .location .href
97
+ };
98
+
99
+ if (window .opener ) {
100
+ window .opener .postMessage (message, window .location .origin );
101
+ window .close ();
102
+ } else if (window .parent && window .parent !== window ) {
103
+ window .parent .postMessage (message, window .location .origin );
104
+ } else {
105
+ localStorage .setItem (' flutter-web-auth-2' , window .location .href );
106
+ window .close ();
107
+ }
108
+ }
109
+
110
+ postAuthenticationMessage ();
99
111
</script >
100
112
```
101
113
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
40
40
'x-sdk-name' : 'Flutter' ,
41
41
'x-sdk-platform' : 'client' ,
42
42
'x-sdk-language' : 'flutter' ,
43
- 'x-sdk-version' : '16.1 .0' ,
43
+ 'x-sdk-version' : '17.0 .0' ,
44
44
'X-Appwrite-Response-Format' : '1.7.0' ,
45
45
};
46
46
@@ -260,6 +260,7 @@ class ClientBrowser extends ClientBase with ClientMixin {
260
260
return FlutterWebAuth2 .authenticate (
261
261
url: url.toString (),
262
262
callbackUrlScheme: "appwrite-callback-" + config['project' ]! ,
263
+ options: const FlutterWebAuth2Options (useWebview: false ),
263
264
);
264
265
}
265
266
}
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class ClientIO extends ClientBase with ClientMixin {
58
58
'x-sdk-name' : 'Flutter' ,
59
59
'x-sdk-platform' : 'client' ,
60
60
'x-sdk-language' : 'flutter' ,
61
- 'x-sdk-version' : '16.1 .0' ,
61
+ 'x-sdk-version' : '17.0 .0' ,
62
62
'X-Appwrite-Response-Format' : '1.7.0' ,
63
63
};
64
64
@@ -359,7 +359,10 @@ class ClientIO extends ClientBase with ClientMixin {
359
359
callbackUrlScheme: callbackUrlScheme != null && _customSchemeAllowed
360
360
? callbackUrlScheme
361
361
: "appwrite-callback-" + config['project' ]! ,
362
- options: const FlutterWebAuth2Options (intentFlags: ephemeralIntentFlags),
362
+ options: const FlutterWebAuth2Options (
363
+ intentFlags: ephemeralIntentFlags,
364
+ useWebview: false ,
365
+ ),
363
366
).then ((value) async {
364
367
Uri url = Uri .parse (value);
365
368
final key = url.queryParameters['key' ];
Original file line number Diff line number Diff line change 1
1
name : appwrite
2
- version : 16.1 .0
2
+ version : 17.0 .0
3
3
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
4
4
homepage : https://appwrite.io
5
5
repository : https://github.com/appwrite/sdk-for-flutter
@@ -20,7 +20,7 @@ dependencies:
20
20
sdk : flutter
21
21
cookie_jar : ^4.0.8
22
22
device_info_plus : ^10.1.2
23
- flutter_web_auth_2 : ^3 .1.2
23
+ flutter_web_auth_2 : ^4 .1.0
24
24
http : ' >=0.13.6 <2.0.0'
25
25
package_info_plus : ^8.0.2
26
26
path_provider : ^2.1.4
You can’t perform that action at this time.
0 commit comments