onAuthStateChange property

Stream<AuthChangeEvent> get onAuthStateChange

The auth event stream.

SupabaseAuthAddons.onAuthStateChange.listen((event) {
  switch (event) {
    case AuthChangeEvent.signedIn:
      // handle sign in
      break;
    case AuthChangeEvent.signedOut:
      // handle sign out
      break;
    case AuthChangeEvent.userUpdated:
      // handle user updated
      break;
    case AuthChangeEvent.passwordRecovery:
      // handle password recovery
      break;
  }
});

Implementation

static Stream<AuthChangeEvent> get onAuthStateChange =>
    _authController.stream;