Luke Wyman
07/07/2021, 5:51 PMFrank
Luke Wyman
07/09/2021, 5:59 PMSingersStack.ts
, PerformanceHistoryStack.ts
, etc, to reference CognitoStack.ts
and apply the Cognito Pool to the APIs in those microservices.Frank
sst.Auth
construct?Luke Wyman
07/09/2021, 10:20 PMLuke Wyman
07/09/2021, 10:20 PMLuke Wyman
07/11/2021, 10:30 PMsst.Auth
construct. So, if I have an auth declared in say a FacebookStack.ts
, and I'd like to reference the auth in the api of a [Microservice Name]Stack.ts
, what is the syntax for that?Frank
Auth
construct or using the JWT token issued by Auth0, Cognito User Pool
or any third party auth provider.Frank
Auth
construct. And to authorize your API, you don’t need to pass the Auth
construct around, you just need to set the authorizationType
to IAM
in your sst.Api
construct.Frank
Authorization
section https://serverless-stack.com/examples/index.htmlLuke Wyman
07/12/2021, 12:42 AMconst auth = new sst.Auth(this, 'Auth', {
facebook: { appId: 'xxxxxxxxxxx'},
});
auth.attachPermissionsForAuthUsers([api]);
but that auth
and api
live in different ____Stack.ts
files. What is the syntax/technique for of connecting the two in the auth.attachPermissions...
line? Can I just export the auth
in it's .ts
file and import it in my MicroserviceStack.ts
file?Frank
lib/AuthStack.ts
const auth = new sst.Auth(...);
this.auth = auth;
in lib/index.ts
const authStack = new AuthStack(app, "auth");
new ApiStack(app, "api", { auth: apiStack.auth });
in lib/ApiStack.ts
const api = new sst.Api(...);
props.auth.attachPermissionsForAuthUsers([api]);
Frank
Luke Wyman
07/13/2021, 6:36 PMLuke Wyman
07/13/2021, 6:37 PMFrank
Erik Mikkelson
07/17/2021, 10:16 PMFrank
Frank
Erik Mikkelson
07/19/2021, 11:40 AMErik Mikkelson
07/19/2021, 11:40 AMFrank
Frank
Frank
dev
stage, and the latter app has dev-erik
, dev-frank
, stages, and all dev-*
stages connect to the same DB in the dev
stageErik Mikkelson
07/19/2021, 7:31 PMFrank
Erik Mikkelson
07/19/2021, 7:56 PM