A native app shares one credential store with its network stack. Inside a WebView that store is walled off: the cookie jar is separate from the system browser and from native HTTP, cross-site cookies are dropped by SameSite rules, and every credentialed fetch needs a CORS handshake the page cannot fully control. A host-owned runtime provides a credential tunnel — one authenticated channel across web and native.

WebView keeps its own cookie jar

On Android, CookieManager is per-WebView-profile and never the system browser's jar. On iOS, WKHTTPCookieStore is separate from NSHTTPCookieStorage, and since iOS 14 the WebView enforces Intelligent Tracking Prevention — third-party cookies expire in seven days and cross-site reads are blocked. A session cookie set by a native login does not automatically reach a fetch() inside the page, so the request comes back 401.

SameSite quietly drops the credential

Chrome 80+ made SameSite=Lax the default and requires Secure on any SameSite=None cookie; iOS 15.4+ binds None to Secure and Partitioned or drops it. So a cookie minted without those attributes is simply not sent on a cross-site request. Combined with CORS, a credentialed fetch needs Access-Control-Allow-Credentials: true and an explicit Access-Control-Allow-Origin (never *) — and a failed preflight throws an opaque TypeError the page cannot inspect.

What breaks when auth crosses the wall

  • Login works, then 401s. Native sets the session; the WebView fetch never carries it.
  • Cross-subdomain SSO fails. login.example.com → app.example.com cookie sync breaks while Safari is fine.
  • SameSite drops the token. A None cookie without Secure is discarded on modern engines.
  • Preflight throws opaque errors. Debugging a CORS denial is blind — it ties back to the WebView debugging black box.
  • Desperate hacks. Some teams reach for --disable-web-security, impossible in production and a compliance landmine.

The runtime fix

A host-owned runtime owns credentials. The host holds the session in one store and bridges it to the page over a single authenticated channel — attaching the right cookie, honoring SameSite and Secure at the native layer, and proxying cross-origin requests so CORS and preflight are handled where they can be seen. One identity, web and native, every request authenticated.

DimensionWebViewHost-owned runtime
Cookie jarSeparate from system and nativeOne shared store
Cross-site cookieDropped by SameSiteHonored at native layer
Credentialed fetchOpaque CORS failureTunneled and visible
SSO across subdomainsBreaksWorks
Preflight debuggingBlind TypeErrorHost-logged
Secure-by-defaultEasy to misconfigureEnforced

A native app never loses its session at the network edge. A stock WebView routinely does. A runtime carries one identity across the wall — and authenticates every request.

Sources