


# refresh 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)> refresh
()

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



<p>Refreshes the current user, if signed in.</p>



## Implementation

```dart
@override
Future<Account> refresh() async {
  try {
    final jwt = await _firebaseAuth.currentUser?.getIdToken(true);
    final account = AccountModel.fromFirebaseUser(
      _firebaseAuth.currentUser,
      accessToken: jwt,
    );

    return account;
  } on FirebaseAuthException catch (e) {
    throw RefreshFailureFirebase.fromCode(e.code);
  } catch (_) {
    throw RefreshFailureFirebase();
  }
}
```







