From a Hybrid Cordova app, we are attempting OIDC authentication by opening the authentication URL in SFSafariViewController. Once login is successful, the session cookie is set by the server. The Cordova app then dismisses SFSafariViewController and the authentication code is passed to the app for validation. Next time when the OIDC URL is launched again in SFSafariViewController, the session cookie is missing. We can see that cookies that are correctly set by the server in set-cookie header but are not sent by safari in the subsequent calls.
This issue does not happen all the time. And it is not specific to any device model. We faced the same issue earlier in iOS 14.6 and posted a query https://developer.apple.com/forums/thread/684675 and could see others facing the same problem as well https://developer.apple.com/forums/thread/663533 but the issue got fixed on its own in the next iOS update. It has resurfaced again in the latest version (16.0.2) Not sure if any update done in Safari during the iOS upgrade is causing this issue. Is anyone facing the cookie issue on iOS 14.6 or 16.0.2?