Sam Hulick
04/08/2022, 3:10 PMsst.Api
definition)
defaultAuthorizer: new HttpUserPoolAuthorizer(
'HttpUserPoolAuthorizer',
props.cognitoAuth.cognitoUserPool!,
{
userPoolClients: [props.cognitoAuth.cognitoUserPoolClient!],
}
),
I’m not sure how to get the issuer and audience from an sst.Auth
instanceBrinsley
04/08/2022, 3:21 PMnew Api(this, "Api", {
authorizers: {
myAuthorizer: {
type: "user_pool",
userPool: {
id: userPool.userPoolId,
clientIds: [userPoolClient.userPoolClientId],
}
},
},
defaults: {
authorizer: "myAuthorizer",
authorizationScopes: ["user.id", "user.email"],
},
routes: {
"GET /notes": "list.main",
"POST /notes": "create.main",
},
});
https://docs.serverless-stack.com/constructs/v1/Api#authorization
Found this under Using Cognito User Poll as the JWT authorizer.Sam Hulick
04/08/2022, 3:22 PMtype: 'user_pool'
is what I was missing.. duh. thanks!