verifyAppleToken method
Verify an Apple ID token
Implementation
Future<VerifyAppleTokenResponse> verifyAppleToken({
required String identityToken,
Map<String, String>? context,
}) async {
final mergedContext = await DeviceMetadata.mergeWithContext(context);
final request = VerifyAppleTokenRequest(
tenantId: tenantId,
identityToken: identityToken,
context: mergedContext,
);
final response = await _client.verifyAppleToken(request);
// Auto-save tokens if enabled and tokens are present
if (autoSaveTokens && response.hasJwt() && response.hasRefreshToken()) {
await saveTokens(
jwt: response.jwt,
refreshToken: response.refreshToken,
);
}
return response;
}