updateProviderConfig method

Future<AuthProviderConfig> updateProviderConfig(
  1. String providerId,
  2. UpdateAuthProviderRequest updatedConfig
)
inherited

Returns a promise that resolves with the updated AuthProviderConfig corresponding to the provider ID specified. If the specified ID does not exist, an auth/configuration-not-found error is thrown.

SAML and OIDC provider support requires Google Cloud's Identity Platform (GCIP). To learn more about GCIP, including pricing and features, see the https://cloud.google.com/identity-platform.

Implementation

Future<AuthProviderConfig> updateProviderConfig(
  String providerId,
  UpdateAuthProviderRequest updatedConfig,
) async {
  if (_OIDCConfig.isProviderId(providerId)) {
    final response = await _authRequestHandler.updateOAuthIdpConfig(
      providerId,
      updatedConfig as OIDCUpdateAuthProviderRequest,
    );
    return _OIDCConfig.fromResponse(response);
  } else if (_SAMLConfig.isProviderId(providerId)) {
    final response = await _authRequestHandler.updateInboundSamlConfig(
      providerId,
      updatedConfig as SAMLUpdateAuthProviderRequest,
    );
    return _SAMLConfig.fromResponse(response);
  }

  throw FirebaseAuthAdminException(AuthClientErrorCode.invalidProviderId);
}