Skip to main content

Refresh Authentication

refreshAuth refreshes the current user’s authentication data from the server. This function fetches the latest user information and token from the backend, updating both the local user and token states with any changes. Use this when you need to ensure the user’s authentication state is synchronized with the server, such as after making changes to the user’s account or when the token needs to be refreshed.

Usage

Parameters

Returns

Promise<VerifyResponse> - A promise that resolves to the verify response containing updated user and token data.

Examples

Basic usage

Listen to auth changes

Last modified on June 24, 2026