signOut method

  1. @override
Future<void> signOut()
override

Signs out from Firebase Auth and any provider-specific session.

Implementation

@override
Future<void> signOut() async {
  try {
    await _auth.signOut();
    // Best-effort sign-out from Google (no-op if not used).
    try {
      await GoogleSignIn.instance.signOut();
    } on Exception {
      // Ignore if Google Sign-In not configured.
    }
  } catch (error) {
    throw Exception('FirebaseSocialAuth.signOut failed: $error');
  }
}