The browser has the cookie. The server says the customer is signed out. Both can be true when a payment provider sends a customer back to the store. Reloading sometimes makes the problem appear to disappear. It is tempting to say the cookie was deleted. The more useful question is whether the browser sent it on that particular return.
A cookie’s SameSite attribute influences whether a browser includes it on a request made in a cross-site context. Strict, Lax, and None describe different circumstances, and the request method and navigation context matter. The Set-Cookie reference documents those distinctions. A cookie can exist in storage yet be absent from a particular request; the reverse can also be complicated by expiry, domain, path, security settings, or browser privacy controls.
Follow the trip, not just the destination
Take a test site at shop.example. A customer starts there, visits an unrelated identity provider, then follows a link back. A top-level navigation using a safe method is different from a background request made by a page on another site, or a page loaded in an embedded frame. Those flows may all end at the same shop URL, but the browser evaluates the context in which each request occurs.
Under the documented SameSite=Lax behavior, a qualifying cross-site top-level navigation using a safe method can include the cookie. A cross-site fetch or an iframe navigation does not meet that top-level criterion. A cross-site POST does not meet the safe-method criterion. SameSite=Strict is more restrictive. SameSite=None permits cross-site use at the attribute level but requires Secure; other browser privacy restrictions can still prevent third-party cookie access.
A practical reproduction should record the request sequence: where the user began, the address and scheme at each step, whether the return was top-level or framed, and which method was used. A screenshot of the final address cannot reveal whether the preceding request was a link, a form POST, or a background request. Nor does the fact that two sites both use HTTPS make them the same site.
Origin and site are related, not interchangeable
An origin is defined using scheme, host, and port. Same-site behavior uses a different concept involving the registrable domain and scheme. Two subdomains may be different origins while being same-site in an applicable context. A change from HTTP to HTTPS can also affect the site comparison. The HTTP cookies guide explains this relationship and the separate role of other cookie attributes.
Say an organization operates login.example.com and shop.example.com. Their origins differ. Whether a cookie is available to one or both hosts depends on the cookie’s Domain and host-only rules, in addition to SameSite. A cookie scoped only to the login host is not automatically sent to the shop host just because the two are same-site. Setting a broad Domain also expands which hosts may receive a cookie; it should not be used casually as a substitute for understanding the actual flow.
Path, expiry, and Secure are separate checks. A cookie with a restricted path may not accompany a request outside it. An expired cookie will not be sent. A Secure cookie is generally restricted to secure connections, subject to documented local-development exceptions. HttpOnly limits access from JavaScript; it does not by itself determine whether the browser attaches a cookie to an HTTP request.
Why a permissive change can mask the real issue
A common emergency fix is to change an authentication cookie to None and move on. That may make a particular cross-site request work in one browser, but it changes the conditions under which the cookie can be sent. It also does not guarantee that embedded cross-site cookies will be available in browsers or configurations that restrict third-party storage.
SameSite can provide some protection against cross-site request forgery, but it is not a complete CSRF defense. The MDN security guidance explains why applications still need appropriate safeguards. Session validation, authorization, secure transport, and a suitable CSRF strategy belong to the whole application, not one attribute. If a third-party flow requires a different design, review the provider’s current integration guidance and the application’s security requirements before changing a live session cookie.
Browsers may apply a Lax-like default when the attribute is omitted, but defaults and exceptions vary. The Set-Cookie reference notes that some browsers have applied a more permissive default behavior for recently set cookies. That means “it worked on my laptop” is particularly weak evidence if the test relied on an omitted attribute. Record the explicit attribute, browser, version, and timing of the observed request.
Make the browser show its work
First reproduce with a test account and a non-sensitive test transaction. Record the intended flow and the exact failure point. In the browser’s developer tools, inspect whether the server set the expected cookie and whether the browser reports that it was stored or rejected. Then inspect the subsequent request and any browser explanation for a cookie not being sent. Avoid copying session values or authentication headers into a ticket or shared chat.
Next compare the cookie’s Domain, Path, Secure, SameSite, and expiration with the actual request host, path, scheme, method, and context. Follow redirects one at a time. A redirect can change the context or request method, and a provider may return users differently for different account or device paths. If the problem occurs only in an embedded view, test a full top-level flow separately rather than assuming the two are equivalent.
Finally, verify the server side. A cookie may be sent but rejected because the session expired, was rotated, belongs to another environment, or was invalidated. A successful login response does not prove a later account action is authorized. Conversely, changing the server to accept a missing session can create a security defect rather than fix the browser issue.
Read two requests side by side
Suppose an identity provider sends a user back by submitting a form to shop.example.com/return. The application observes that the existing session cookie did not accompany that request. The user then follows a link to the shop's account page, where the session appears to work. That is not, by itself, proof that the browser restored a deleted cookie. The two requests had different methods and contexts; the cookie could have remained stored while its eligibility differed.
Capture a safe comparison, not the cookie value. For each step, record the request's host and path, whether it was a top-level navigation or an embedded request, the method, the response status, and whether the developer tools reported a cookie as sent, omitted, or blocked. Note whether the server issued a new Set-Cookie header or redirected again. Then check the same sequence in another supported browser with the same starting conditions. A second browser result is useful context, not proof that all devices behave alike.
There can also be more than one cookie with the same name but different paths or domains. A server that assumes the name identifies one unique session can produce confusing results if multiple matching cookies are sent. Inspect the scope and the application's parsing behavior before deciding that SameSite is responsible. Never paste the actual cookie header into a bug report: session material may grant access even when it looks like an opaque string.
If the identity provider's contract allows a different return flow, compare that design with the current one before changing cookie settings. A return endpoint may need an explicitly validated, short-lived correlation value and a clear path back to an existing session. The exact mechanism depends on the provider's documented protocol and the application's threat model. Inventing a custom bypass for a missing session is not a safe substitute for completing that design.
Design the return path intentionally
A reliable integration makes state transitions explicit. The application should know what it expects when a user leaves, what evidence it needs on return, and how to recover if the browser cannot provide the original session. Provider callbacks and user browser redirects are different channels with different trust properties. A page that says “complete” is not by itself proof that an independent payment, order, or account change completed.
For a planned change, test a matrix that includes the supported browsers, an ordinary external link return, the actual provider’s return method, an embedded context if used, a fresh session, and an expired session. Include accessibility and privacy settings relevant to the audience. Use test-mode systems and non-sensitive data; do not manufacture a real sale or alter a live user account simply to make a dashboard show success.
Keep a short record of the observed request and the tested fix, with secrets removed. The goal is not to find the most permissive cookie setting that makes one browser happy. It is to understand why the session is available—or unavailable—at each step, and to preserve the security properties the original setting was meant to support.
Explore Infinite Upside
For Vijay Sheth’s personal accounts, read Infinite Upside: Building Wealth With Room to Live, published by Sheth Capital, Inc.
Explore a related guide
Why does a DNS change appear at different times?