Can't find the correct syntax on how to add a doma...
# help
g
Can't find the correct syntax on how to add a domain. in cdk we do userPool.addDomain("UserPoolDomain", {    cognitoDomain: {      domainPrefix: domainName    }, }); how to do this in sst? I already tried cognito: {   userPool: {     addDomain("UserPoolDomain", {        cognitoDomain: {               domainPrefix: domainName            },         }     },
g
first of all you create the userpool, after creation you can add a domain in this way
this.cognitoUserPool?.addDomain('admin-userpool-domain', {
cognitoDomain: {
domainPrefix: props.auth_domain,
},
});
your first solution seems correct, which error did you get?
g
yes, the first solution is correct. there are no errors ai encountered. It seems just I cant use this way
_new_ Auth(_this_, "Auth", {
cognito: {
triggers: {
preAuthentication: "src/preAuthentication.main",
postAuthentication: "src/postAuthentication.main",
},
},
});
to add triggers.
I just manually added the triggers to the created UserPool