Closed jaduplessis closed 6 days ago
Hmm we'll take a look.
Fixed in v0.0.433
Authorizers now need to be created explicitly, ie.
const myAuthorizer = api.addAuthorizer({
name: "myAuthorizer",
jwt: {
issuer: "https://issuer.com/",
audiences: ["https://api.example.com"],
identitySource: "$request.header.AccessToken"
}
});
And set it on the route:
api.route("GET /", "src/get.handler", {
auth: {
jwt: {
authorizer: myAuthorizer.id,
}
}
});
Here's the doc - https://ion.sst.dev/docs/component/aws/apigatewayv2/#addauthorizer
Each new api route creates a new Authorizer instead of using an existing one.
This error is not found on older versions of Ion. I believe the issue was introduced in PR-471 in an attempt to make multiple authorizers for different apis