authenticate method
Authenticates with the Electric sync service using the provided token. @returns A promise that resolves to void if authentication succeeded. Otherwise, rejects with the reason for the error.
Implementation
@override
Future<void> authenticate(String token) async {
final authState = AuthState(
clientId: this.authState!.clientId,
token: token,
);
final authResp = await client.authenticate(authState);
if (authResp.error != null) {
Error.throwWithStackTrace(authResp.error!, authResp.stackTrace!);
}
setAuthState(authState);
}