v0 iOS app: preview fails with redirect loop for GitHub-linked projects (NSURLErrorDomain -1007)

Bug

The v0 iOS app cannot load previews for GitHub-linked project chats. It fails immediately with:
Error loading page
Domain: NSURLErrorDomain
Error Code: -1007
Description: too many HTTP redirects
The same project previews fine on v0 web. Non-GitHub (simple) chats preview fine on the iOS app.

Steps to Reproduce

  1. Import github.com/mrosnerr/v0-ios-repro into v0 — this is a vanilla create-next-app with zero modifications (no auth, no middleware, no redirects)
  2. Open the chat on v0 web → preview loads :white_check_mark:
  3. Open the same chat on v0 iOS app → redirect error :cross_mark:
    Repro chat: https://v0.app/chat/v0-vclv012-3575-ddd841f2-TyIwA6dshD8?ref=130PO3

Why It Happens

Project-linked chats use vm-*.vusercontent.net (Vercel Sandbox), which requires a cross-domain OAuth redirect chain:

  1. vusercontent.net → 302 → v0.app/api/auth/login (sets oauth_state cookie, SameSite=Lax)
  2. v0.app → 307 → vercel.com/api/vercel-auth
  3. vercel.com → 307 → vercel.com/login/v0

When vercel.com redirects back to v0.app/api/auth/callback, WKWebView appears to drop the oauth_state cookie due to stricter cross-site SameSite=Lax enforcement → auth fails → redirects back to login → infinite loop.
Simple (non-GitHub) chats use *.lite.vusercontent.net which returns a 200 directly with no auth required — so they work fine.
Run these to see the difference:

# GitHub-linked project preview: 302 auth redirect (triggers loop in WKWebView)
curl -s -o /dev/null -w "%{http_code}\n" "https://vm-819spyr33csz9p6b8gkiml8w.vusercontent.net/"
# → 302
# Simple chat preview: 200 direct (no auth, works fine)
curl -s -o /dev/null -w "%{http_code}\n" "https://b-pqvzuiwbelp.lite.vusercontent.net/"
# → 200

Environment

  • iPhone 15 Pro, iOS 26.3.1 (a)
  • v0 iOS app v0.0.26
  • v0 web works fine for the same project

Seems to be working fine now, might have been fixed under a different issue :person_shrugging: