updateTokens method
Updates the access token (and optionally refresh token) for the current session.
Use this after receiving an auth error event when using a custom sync URL or when your backend provides new tokens. The SDK will automatically retry any pending uploads with the new credential.
Implementation
@override
Future<void> updateTokens({
required String accessToken,
String? refreshToken,
}) async {
await _channel.invokeMethod<void>('updateTokens', {
'accessToken': accessToken,
if (refreshToken != null) 'refreshToken': refreshToken,
});
}