getProviderIdFromResourceName static method
Returns the provider ID corresponding to the resource name if available.
Implementation
static String? getProviderIdFromResourceName(String resourceName) {
// name is of form projects/project1/oauthIdpConfigs/providerId1
final matchProviderRes = RegExp(
r'\/oauthIdpConfigs\/(oidc\..*)$',
).firstMatch(resourceName);
if (matchProviderRes == null || matchProviderRes.groupCount < 1) {
return null;
}
return matchProviderRes[1];
}