The document shows that we can use custom name. However, it will throw the error "clientName must contain a scheme".
String userPoolId = "ap-northeast-1_XXXXXXXX"; //cens user
String clientName = "clientName";
AWSCognitoIdentityProvider provider = AWSCognitoIdentityProviderClientBuilder.defaultClient();
CreateUserPoolClientRequest update = new CreateUserPoolClientRequest()
.withUserPoolId(userPoolId)
.withClientName(clientName)
.withAllowedOAuthFlows(OAuthFlowType.Implicit)
.withAllowedOAuthScopes("phone", "email", "openid");
provider.createUserPoolClient(update);
I ran into the same "must contain a scheme" error today when attempting to provision a new Cognito UserPool + UserPoolClient via CloudFormation. It's a poorly worded error. What it should say is: "The URLs you provided for either the callback or logout URLs must contain a scheme, such as https."
Once I updated my URLs so that they started with https, the CloudFormation deploy was able to move beyond the error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With