signInWithProvider method

Future<CloudAccount> signInWithProvider(
  1. String provider,
  2. String idToken, {
  3. String? nonce,
  4. String? displayName,
})

Sign in with Apple / Google (POST /auth/oauth/{provider} with the provider's id token).

Implementation

Future<CloudAccount> signInWithProvider(
  String provider,
  String idToken, {
  String? nonce,
  String? displayName,
}) async => _adopt(
  await _api.json(
    CloudOperations.signInWithProvider,
    CloudSession.fromJson,
    params: {'provider': provider},
    body: {
      'idToken': idToken,
      'nonce': ?nonce,
      'displayName': ?displayName,
      'client': _client,
    },
    authenticated: false,
  ),
);