Skip to content
FIRERUN.

The BaaS & deploy-platform newsroom for builders

Subscribe

Supabase

Supabase's Next Swift SDK Rejects Invite Links Unless Apps Opt In

Check how invite and generateLink emails reach an iOS app before moving to supabase-swift v3. Links that carry tokens now throw by default.

Abstract flat-vector editorial illustration for "Supabase's Next Swift SDK Rejects Invite Links Unless Apps Opt In"

The next major version of Supabase’s Swift SDK refuses sign-in links that carry tokens in the URL, so iOS and macOS apps that accept team invites or server-generated magic links will start throwing on those links unless developers opt back in. Supabase put v3 of supabase-swift into public alpha on Nov. 25 and marked it a breaking change (Supabase changelog, Nov. 25, 2026).

What Changes in Auth

v3 always uses PKCE for the sign-in flows it starts, so those links come back with a one-time code. Links built anywhere else still use the older implicit flow, which puts #access_token=… in the URL fragment. The SDK’s v3 migration guide says handleRedirect(_:) now throws an AuthError of kind .oauthFlowFailed on those URLs and stores nothing.

The guide names the links that hit this: invites, links from the admin generateLink call, and email links that another client or a v2 build of the app requested. During rollout, a magic link requested from an old build fails if it is opened after the App Store update.

The fix is one flag, acceptsImplicitTokens: true, on the auth configuration. The guide warns that a URL accepted this way signs in whichever account its tokens belong to, “whoever made it,” so apps should pass only URLs that reach their own callback.

Two more auth changes compile cleanly and behave differently, according to the guide. If a session refresh or a custom accessToken closure throws, the database, storage or functions request now fails with an .accessToken error; v2 sent the request with the API key instead. And an Authorization header the app sets itself now wins over the session token, where v2 overwrote it.

The Rest of the Release

Supabase said v3 adds typed queries generated by supabase gen types --lang swift, typed RPC calls, one configuration and error shape across Auth, Database, Storage, Functions and Realtime, and Swift 6 concurrency throughout. It needs Xcode 26 and Swift 6.2. Typed queries sit behind @_spi(Experimental), and string-based from("books") still works.

The changelog lists other silent changes: URLError and DecodingError arrive wrapped in the module’s error type, cancelled tasks throw CancellationError instead of URLError(.cancelled), and custom middleware runs once per retry attempt. The migration guide adds that the SDK now sets its own request timeouts, 60 seconds or 150 for Functions, and ignores timeoutIntervalForRequest.

Timeline

Nothing changes until a project opts in. Swift Package Manager won’t resolve a prerelease or cross a major version from a from: "2.0.0" requirement, Supabase said. The changelog announced 3.0.0-alpha.1; the migration guide on GitHub now points to 3.0.0-alpha.3. Supabase said v2 gets security and critical fixes for 6 months after 3.0.0 ships.

The Take

This is the same shape as the Flutter v3 release Supabase announced Nov. 6: the compile errors are loud, and the breaks that matter are quiet. This time the quiet break hits the one screen nobody tests after an upgrade, the invite email. PKCE by default is the right call, since a token in a URL fragment can leak through logs and history. But any app that onboards users by invite should search for handleRedirect, decide on acceptsImplicitTokens before the alpha becomes 3.0.0, and test a link sent from the old build.

Stay in the loop

Get new articles in your inbox

We'll only email you when a new article drops. Unsubscribe anytime.