-
Notifications
You must be signed in to change notification settings - Fork 175
Authentication fails due to In collectInfoFromReq: missing state in the request
for some users
#423
Comments
We started the same issue all of a sudden today |
|
|
I am also experiencing this issue. For me, it seems to be connected to decrypting the cookie. Namely these rows: passport-azure-ad/lib/cookieContentHandler.js Lines 169 to 172 in ee2ec66
The underlying error is: If I change row 171 and 172 to:
Then it starts working for me. Is this the same issue? Edit: Just FYI, I'm running on Node v13.3.0 |
In my case, Edit with references: https://www.chromium.org/updates/same-site/incompatible-clients and https://bugs.webkit.org/show_bug.cgi?id=198181 |
I have tested it on LTS (v12.14.1) and confirm that the problem doesn't occur there, but can reproduce it consistently in v13.3.0 |
Had the same problem when we moved from Node v12 to 13.5.0. mowday's fix to cookieContentHandler worked for us, too. node.js behaviour seems to have slightly changed in version 13 - related documentation issue: nodejs/node#29786. I tested mowday's fix also with node v12.13.1 - it didn't break anything there. It seems that it would be safe to incorporate the fix to the main library. |
I get this error when running on docker using Here's a minimal reproducible example, should the Azure-AD team dive into this problem: changing this line to |
@jdthorpe I had the same issue after upgrading from another 13.x version to 13.8.0 to fix the recent vulnerabilities. I haven't yet found the root cause, but I did work around it by setting |
I use Docker with node:12-alpine image. I got this error after deploying to our production environment. I tried @bburhans suggestion to set Any ideas as to why is that and how to fix this? |
Why is this not being fixed? |
Any updates on this issue? |
I have not had the issue since setting the SameSite attribute on the cookie to 'none' and secure to true. This means that you must run your app behind HTTPS. I have deployed this to our testing server behind HTTPS and it works fine. I still have the issue on my local dev machine because I'm running on HTTP. |
Hi all, is this still an issue in the latest version of passport-azure-ad? We are currently in the design phase of a new version of this library, which can be tracked here. The timeline for the new library will be uploaded to our MSAL JS repo. We will ensure to cover issues with state in the design phase here. |
Closing this. Please track our new repo as requested |
Over the past couple weeks, I've had a few users report they can no longer sign in via Azure SSO that had been able to previously. I can see through my logs that
In collectInfoFromReq: missing state in the request
andIn collectInfoFromReq: invalid state received in the request
are frequent errors.I cannot figure out why only some users are having this issue and I haven't been able to reproduce it myself. I've tried
useCookieInsteadOfSession
to no avail. Does anyone have any suggestions for what could be going on?The text was updated successfully, but these errors were encountered: