# Option sameSite is invalid - Auth0 express quickstart

**URL:** <https://community.auth0.com/t/option-samesite-is-invalid-auth0-express-quickstart/64691>\
**Category:** Get Help\
**Tags:** express, auth0\
**Created:** [June 18, 2021, 5:59am UTC](https://community.auth0.com/t/option-samesite-is-invalid-auth0-express-quickstart/64691 "2021-06-18T05:59:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevina](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kevina/32/12848_2.png) [@kevina](https://community.auth0.com/u/kevina)\
**Post date:** [June 18, 2021, 5:59am UTC](https://community.auth0.com/t/option-samesite-is-invalid-auth0-express-quickstart/64691/1 "2021-06-18T05:59:21Z")

</div>

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](https://auth0.com/docs/quickstart/webapp/express) 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.  
Thanks  
Kevin

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 18, 2021, 6:49am UTC](https://community.auth0.com/t/option-samesite-is-invalid-auth0-express-quickstart/64691/2 "2021-06-18T06:49:00Z")

</div>

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:

> **[Build software better, together](https://github.com/auth0-samples/auth0-express-webapp-sample/issues/new)**
>
> GitHub is where people build software. More than 94 million people use GitHub to discover, fork, and contribute to over 330 million projects.

---

<div class="post-metadata">

**Author:** ![kevina](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kevina/32/12848_2.png) [@kevina](https://community.auth0.com/u/kevina)\
**Post date:** [June 18, 2021, 8:33pm UTC](https://community.auth0.com/t/option-samesite-is-invalid-auth0-express-quickstart/64691/3 "2021-06-18T20:33:53Z")

</div>

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.  
Thanks  
Kevin

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [June 21, 2021, 8:02am UTC](https://community.auth0.com/t/option-samesite-is-invalid-auth0-express-quickstart/64691/4 "2021-06-21T08:02:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jonpawelko](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jonpawelko/32/33352_2.png) [@jonpawelko](https://community.auth0.com/u/jonpawelko)\
**Post date:** [December 4, 2021, 8:41pm UTC](https://community.auth0.com/t/option-samesite-is-invalid-auth0-express-quickstart/64691/5 "2021-12-04T20:41:33Z")

</div>

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](https://www.youtube.com/watch?v=QQwo4E_B0y8) 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?

---

<div class="post-metadata">

**Author:** ![adam.mcgrath](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adam.mcgrath/32/22033_2.png) [@adam.mcgrath](https://community.auth0.com/u/adam.mcgrath)\
**Post date:** [January 12, 2022, 11:11am UTC](https://community.auth0.com/t/option-samesite-is-invalid-auth0-express-quickstart/64691/6 "2022-01-12T11:11:16Z")

</div>

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](https://github.com/auth0/express-openid-connect/blob/master/package.json#L69)

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 7, 2022, 12:17pm UTC](https://community.auth0.com/t/option-samesite-is-invalid-auth0-express-quickstart/64691/7 "2022-02-07T12:17:57Z")

</div>

Thanks for sharing that Adam!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 22, 2022, 12:17pm UTC](https://community.auth0.com/t/option-samesite-is-invalid-auth0-express-quickstart/64691/8 "2022-02-22T12:17:58Z")

</div>

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