Closed SpiegelSoft closed 1 year ago
Hi @SpiegelSoft - thanks for raising this
Could you share the details of any errors in your App Engine logs? Otherwise there's not much I can suggest - the code you've shared looks correct
Hi Adam -- many apologies, but I have switched to Fastify (not because of this issue, which actually didn't matter to me, because I was happy to set authRequired
to false, but because the integration with Websockets is smoother). I'll revert and try again when I can find a bit of spare time.
np @SpiegelSoft - happy to reopen when you provide some more details
Checklist
Description
When an app is deployed to the App Engine in the Google Cloud Platform, and the middleware is defined as follows:
and then a request is sent to the App Engine URL using the CURL protocol, i.e.
the result of the CURL request is a 500 error. The App Engine shuts down because of this request.
However, if the auth check is changed to
then the call to the endpoint succeeds, and the
req.auth
field is populated correctly.I suspect that this is because the GCP App Engine generates some kind of preflight request that causes the middleware to throw an error.
Reproduction
authRequired
field).oauth/token
endpoint./
endpoint using the CURL protocol.authRequired: true
to thejwtCheck
middleware.req.auth
field is populated.Additional context
No response
express-oauth2-jwt-bearer version
1.5.0
Node.js version
18.14.0