Option sameSite is invalid - Auth0 express quickstart

Hi, Some details of the environment initially.
Please include the following information in your post:
SDK: express-openid-connect
Version: 2.4.0
Node: 14.16.1

Error 1
TypeError: option sameSite is invalid
at Object.serialize (C:\projects\app\node_modules\express\node_modules\cookie\index.js:174:15)
at ServerResponse.res.cookie (C:\projects\app\node_modules\express\lib\response.js:853:36)
at TransientCookieHandler.store (C:\projects\app\node_modules\express-openid-connect\lib\transientHandler.js:105:11)
at ResponseContext.login (C:\projects\app\node_modules\express-openid-connect\lib\context.js:258:17)

Warning 1
Using ‘form_post’ for response_mode may cause issues for you logging in over http

I’ve followed the Quickstart tutorial at Auth0 Express SDK Quickstarts: Login and on the ‘Login’ step I get the above error and warning. I have followed the directions to get caddy working and am browsing my app via https and the error still occurs.
I’ve found other users discussing this error and mostly understand what the issue is but I don’t understand how to fix it. I am very much not a developer and very slowly learning while building my own app.

Although I need to fix this in my own app I am going to try the provided sample app to make sure there is not another config issue in my Auth0 app config.

Any (simple) advice to fix this would be appreciated.

Hey there!

I guess that’s something that we should discuss with the quickstart maintainers, can you raise the issue in the GitHub repo and let us know once you do that so we can ping the maintainers? Thank you!

Here’s the link to the issues section of the quickstart:

Hi, thanks for the reply.
It seems there is something wrong with my app as grabbing a copy of the sample and running it works without issue.
I just need to work out what my issue is, but totally unsure where to look.

1 Like

As I said try sharing it as a GitHub issue through the link above

I basically run the Quickstart tutorial as this other fellow mentions and I get the same error. I didn’t try the Caddy solution yet. I followed a similar Auth0 tutorial… Add Node.js User Authentication in 10 Minutes! - YouTube and get the same error. I also posted this question there. I have a pretty new computer with all new versions of software. I like what I see with Auth0, but if I can’t even run a tiny demo, how could use it in my projects?

To anyone bumping into this issue, it’s probably because you’re using an old version of express

Note that this SDK requires express >=4.27.0 express-openid-connect/package.json at master · auth0/express-openid-connect · GitHub

1 Like

Thanks for sharing that Adam!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.