Hey guys, I have an API endpoint that has `ApiAuth...
# help
s
Hey guys, I have an API endpoint that has
ApiAuthorizationType.NONE
The question is how do I detect whether a logged-in user made a request to this endpoint as
event.requestContext.authorizer
doesn't exist for
ApiAuthorizationType.NONE
endpoints. I'm using
AWS_IAM
as my authorization type for authenticated APIs. Thanks.
l
Why not use IAM there as well with a separate role for not logged users?
t
This is a huge painpoint, aws authorizers do not make it easy to handle common situations that are more advanced
afaik there isn't a way to have an endpoint that is optionally authenticated
This is why I ended up doing authentication in my lambda
a
I haven't done this either, but I'm thinking two routes to the same Lambda, with with an authorizer and one without. Client knows if it has an auth token and so can use the proper API path.