Hey, everyone! Quick question: When creating an AP...
# general
d
Hey, everyone! Quick question: When creating an API for SuperTokens in API Gateway, should I create an HTTP or a REST API?
r
Which API gateway @User
d
I'm following the AWS Lambda guide, but the API Gateway configuration part starts from configuring an existing API, so I was wondering whether I should create a REST or HTTP API. I went with REST, but I've yet to test it.
r
If you are using JWT authorizer then you should use HTTP. Else, I think REST should work (but this will require a custom lambda authorizer, for which we have a guide too).
d
I'm using sessions, so I'll go with REST. Thanks!
r
Cool! So you will have to use custom lambda authorizer.
d
BTW,
auth.js
and
user.js
go into separate projects as separate Lambda functions, right? So I can tell one Lambda to use
auth.handler
and the other
user.handler
.
And associate GET requests with one and POST with the other.
r
idk about separate projects, but separate functions - sure.
d
Yeah, pretty much.
So I have to use Lambda authorizers? I was hoping, since both it, JWT, and session verification are grouped under the same umbrella, I'd go with the easiest one—session verification—and save myself the headache. I guess that won't work out?
I mean this "umbrella". 😅
r
The easier one is JWT authoriser. But for that, you will have to use HTTP and NOT REST
d
Thank you very much, rp!
2 Views