createProviderConfig method
Returns a promise that resolves with the newly created AuthProviderConfig
when the new provider configuration is created.
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> createProviderConfig(
AuthProviderConfig config,
) async {
if (_OIDCConfig.isProviderId(config.providerId)) {
final response = await _authRequestHandler.createOAuthIdpConfig(
config as _OIDCConfig,
);
return _OIDCConfig.fromResponse(response);
} else if (_SAMLConfig.isProviderId(config.providerId)) {
final response = await _authRequestHandler.createInboundSamlConfig(
config as _SAMLConfig,
);
return _SAMLConfig.fromResponse(response);
}
throw FirebaseAuthAdminException(AuthClientErrorCode.invalidProviderId);
}