For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Refresh the session

Use the refreshSession method to refresh the user's current auth session. The method returns the updated Web3AuthResponse.

This method is available from v8.

Usage​

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());
}
On this page