We have faced issue which seems to be related to Safari’s Intelligent Tracking Protection functionality when using express-openid-connect library.
Safari may drop the transaction cookie auth_verification when browser is redirected back to the client backend callback route in authorization code flow. The redirect from the oidc provider back to site is considered “cross-site” redirect and Safari in some occasions may decide to omit the otherwise valid 1st party auth_verification cookie.
This result to BadRequestError: checks.state argument is missing error.
Is there any workaround for this when using express-openid-connect?
It seems that implementing the custom session store (e.g. Redis) would not help as the transaction cookie is still used. Or have we understood this incorrectly?
We are not using iframes or any kind of silent authentication. The issue happens in the callback (step 5.) of the normal redirect based authorization code flow where Safari drops the transaction cookie which express-openid-connect libary sets and needs in the callback handling: