diff --git a/lib/src/services/authentication/authentication_service.dart b/lib/src/services/authentication/authentication_service.dart index dfadd7a..9c253e1 100644 --- a/lib/src/services/authentication/authentication_service.dart +++ b/lib/src/services/authentication/authentication_service.dart @@ -103,7 +103,7 @@ class ArcaneAuthenticationService extends ArcaneService { /// Logs the current user out. Upon successful logout, `status` will be set to /// `AuthenticationStatus.unauthenticated`. - Future logOut() async { + Future logOut({required VoidCallback onLoggedOut}) async { if (_mocked) return; if (status == AuthenticationStatus.unauthenticated) return; @@ -112,6 +112,7 @@ class ArcaneAuthenticationService extends ArcaneService { await loggedOut.fold( onSuccess: (_) async { setUnauthenticated(); + onLoggedOut(); }, onError: (e) { throw Exception(e);