If your app already has customer accounts, server-signed identity gives the
smoothest experience. Call
identify and customers do not need a second sign-in.1. Register a callback scheme
Choose a unique lowercase reverse-domain value, for example:setup:
2. Forward magic-link callbacks
Google sign-in returns through Apple’s authentication session automatically. Magic links open from the customer’s email app, so your app must forward the incoming URL to Glean Feed.SwiftUI
UIKit scene delegate
What customers experience
- Google: iOS presents the standard secure web authentication sheet. After Google completes, the sheet closes and the authenticated portal continues in the existing Glean Feed view.
- Magic link: Glean Feed sends the normal branded email. Tapping the link verifies the address, returns to your app, and finishes in the existing Glean Feed view.
Security model
The flow uses OAuth-style authorization code exchange with PKCE:- The app creates a fresh verifier and sends only its SHA-256 challenge.
- The browser callback contains a short-lived, single-use authorization code—not a portal session or long-lived user token.
- Completion requires the callback code, the app-held PKCE verifier, and a separate device secret.
- The server atomically consumes the transaction. Replays and callbacks for another transaction fail.
- The final portal handoff is accepted only on the exact portal origin already loaded by the SDK.
GleanFeed.handleOpenURL(_:).