Class UserPoolDomain
Define a user pool domain.
public class UserPoolDomain : Resource, IUserPoolDomain, IResource, IConstruct, IConstruct, IDependable
- Inheritance
-
UserPoolDomain
- Implements
-
IResourceIConstructIConstructIDependable
Examples
var userpool = new UserPool(this, "UserPool", new UserPoolProps { });
var client = userpool.AddClient("Client", new UserPoolClientOptions {
// ...
OAuth = new OAuthSettings {
Flows = new OAuthFlows {
ImplicitCodeGrant = true
},
CallbackUrls = new [] { "https://myapp.com/home", "https://myapp.com/users" }
}
});
var domain = userpool.AddDomain("Domain", new UserPoolDomainOptions { });
var signInUrl = domain.SignInUrl(client, new SignInUrlOptions {
RedirectUri = "https://myapp.com/home"
});
Remarks
ExampleMetadata: infused
Constructors
UserPoolDomain(Construct, string, IUserPoolDomainProps)
public UserPoolDomain(Construct scope, string id, IUserPoolDomainProps props)
Parameters
scope
Constructid
stringprops
IUserPoolDomainProps
Properties
CloudFrontDomainName
The domain name of the CloudFront distribution associated with the user pool domain.
public virtual string CloudFrontDomainName { get; }
Property Value
DomainName
The domain that was specified to be created.
public virtual string DomainName { get; }
Property Value
Remarks
If customDomain
was selected, this holds the full domain name that was specified.
If the cognitoDomain
was used, it contains the prefix to the Cognito hosted domain.
Methods
BaseUrl(IBaseUrlOptions?)
The URL to the hosted UI associated with this domain.
public virtual string BaseUrl(IBaseUrlOptions? options = null)
Parameters
options
IBaseUrlOptionsoptions to customize baseUrl.
Returns
FromDomainName(Construct, string, string)
Import a UserPoolDomain given its domain name.
public static IUserPoolDomain FromDomainName(Construct scope, string id, string userPoolDomainName)
Parameters
Returns
SignInUrl(UserPoolClient, ISignInUrlOptions)
The URL to the sign in page in this domain using a specific UserPoolClient.
public virtual string SignInUrl(UserPoolClient client, ISignInUrlOptions options)
Parameters
client
UserPoolClient[disable-awslint:ref-via-interface] the user pool client that the UI will use to interact with the UserPool.
options
ISignInUrlOptionsoptions to customize signInUrl.