diff --git a/packages/auth/lib/src/strategies/local.dart b/packages/auth/lib/src/strategies/local.dart index 99cbf7da..f8514a30 100644 --- a/packages/auth/lib/src/strategies/local.dart +++ b/packages/auth/lib/src/strategies/local.dart @@ -8,7 +8,7 @@ bool _validateString(String? str) => str != null && str.isNotEmpty; /// Determines the validity of an incoming username and password. // typedef FutureOr LocalAuthVerifier(String? username, String? password); -typedef LocalAuthVerifier = FutureOr Function( +typedef LocalAuthVerifier = FutureOr Function( String? username, String? password); class LocalAuthStrategy extends AuthStrategy { diff --git a/packages/auth/test/local_test.dart b/packages/auth/test/local_test.dart index ff63a59c..ae583701 100644 --- a/packages/auth/test/local_test.dart +++ b/packages/auth/test/local_test.dart @@ -13,11 +13,12 @@ var localOpts = AngelAuthOptions>( failureRedirect: '/failure', successRedirect: '/success'); Map sampleUser = {'hello': 'world'}; -Future> verifier(String? username, String? password) async { +Future?> verifier( + String? username, String? password) async { if (username == 'username' && password == 'password') { return sampleUser; } else { - throw ArgumentError('Unexpected type for data'); + return null; } }