Skip to content

Commit 5dc2994

Browse files
authored
Add proper Linux support in Web Auth
1 parent 3292558 commit 5dc2994

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/flutter/lib/src/client_io.dart.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,13 @@ class ClientIO extends ClientBase with ClientMixin {
305305
return res;
306306
}
307307

308+
bool get _customSchemeAllowed => Platform.isWindows || Platform.isLinux;
309+
308310
@override
309311
Future webAuth(Uri url, {String? callbackUrlScheme}) {
310312
return FlutterWebAuth2.authenticate(
311313
url: url.toString(),
312-
callbackUrlScheme: callbackUrlScheme != null && Platform.isWindows ? callbackUrlScheme : "appwrite-callback-" + config['project']!,
314+
callbackUrlScheme: callbackUrlScheme != null && _customSchemeAllowed ? callbackUrlScheme : "appwrite-callback-" + config['project']!,
313315
preferEphemeral: true,
314316
).then((value) async {
315317
Uri url = Uri.parse(value);

0 commit comments

Comments
 (0)