AppAuth implements native OAuth 2.0 and OpenID Connect flows for iOS, macOS, and tvOS with PKCE, token refresh helpers, and RFC 8252-oriented browser agents.
Overview
AppAuth for iOS and macOS is a client library for talking to OAuth 2.0 and OpenID Connect providers. It maps protocol requests and responses closely while following familiar patterns for Objective-C and Swift callers, and adds convenience APIs for tasks such as calling backends with up-to-date access tokens.
On iOS it follows native-app guidance from RFC 8252, using system browser flows such as ASWebAuthenticationSession rather than embedded web views called out as unsupported for security reasons. PKCE is applied when exchanging authorization codes in public clients. Additional protocol parameters can be carried through standard and custom extensions.
macOS builds support custom URI schemes and loopback HTTP redirects managed by a small embedded redirect handler. tvOS support centers on the device authorization grant so users can sign in on TV by completing authorization on another device.
Developers integrate via Swift Package Manager, Carthage, or static linking, choosing full AppAuth, core-only AppAuthCore for extensions, or AppAuthTV for TV flows. OIDAuthState tracks tokens and refresh state so sessions can be persisted across app launches.
Key features
- OAuth 2.0 and OpenID Connect client flows
- PKCE for public native clients
- OIDAuthState token and refresh tracking
- ASWebAuthenticationSession on iOS
- Loopback HTTP redirects on macOS
- tvOS device authorization grant
- Swift Package Manager and Carthage distribution
- Custom external user-agent hooks
Use cases
- Native iOS app login with OpenID Connect
- macOS desktop OAuth with loopback redirect
- tvOS sign-in via secondary device approval
- Extension-friendly core-only integration