> For the complete documentation index, see [llms.txt](/llms.txt).

# Refresh the session

Use the `refreshSession` method to refresh the user's current auth session. The method returns the updated [Web3AuthResponse](/embedded-wallets/sdk/flutter/usage/connect-to/#response).

This method is available from v8.

## Usage

```dart
try {
  final Web3AuthResponse response = await Web3AuthFlutter.refreshSession();
  final String? privateKey = response.privateKey;
} catch (e) {
  // Thrown when the session can't be refreshed, for example when no session is present.
  log(e.toString());
}

```
