diff --git a/lib/src/services/authentication/authentication_service.dart b/lib/src/services/authentication/authentication_service.dart index 55f769b..703fdd7 100644 --- a/lib/src/services/authentication/authentication_service.dart +++ b/lib/src/services/authentication/authentication_service.dart @@ -146,7 +146,7 @@ class ArcaneAuthenticationService extends ArcaneService { /// Logs the current user out. Upon successful logout, `status` will be set to /// `AuthenticationStatus.unauthenticated`. - Future logOut({VoidCallback? onLoggedOut}) async { + Future logOut({Future Function()? onLoggedOut}) async { if (_mocked) return; if (!isAuthenticated) return; @@ -155,7 +155,7 @@ class ArcaneAuthenticationService extends ArcaneService { await loggedOut.fold( onSuccess: (_) async { setUnauthenticated(); - if (onLoggedOut != null) onLoggedOut(); + if (onLoggedOut != null) await onLoggedOut(); }, onError: (e) { throw Exception(e);