


# signInAnonymously method




    *[<Null safety>](https://dart.dev/null-safety)*



- @[override](https://api.flutter.dev/flutter/dart-core/override-constant.html)

[Future](https://api.flutter.dev/flutter/dart-async/Future-class.html)&lt;[Account](../../wyatt_authentication_bloc/Account-class.md)> signInAnonymously
()

_<span class="feature">override</span>_



<p>Sign in anonymously.</p>
<p>Throws a SignInAnonymouslyFailureInterface if an exception occurs.</p>



## Implementation

```dart
@override
Future<Account> signInAnonymously() async {
  try {
    final userCredential = await _firebaseAuth.signInAnonymously();

    return _addToStream(
      userCredential,
      (account) => SignedInEvent(
        account: account,
      ),
    );
  } on FirebaseAuthException catch (e) {
    throw SignInAnonymouslyFailureFirebase.fromCode(e.code);
  } catch (_) {
    throw SignInAnonymouslyFailureFirebase();
  }
}
```







