authenticationlisted
Install: claude install-skill thienqo/ios-skills
# Authentication
Implement authentication flows on iOS using AuthenticationServices and LocalAuthentication, including Sign in with Apple, passkeys (WebAuthn), OAuth web sessions, Password AutoFill, and biometric verification. Targets Swift 6.4 / iOS 26+.
## Contents
- [Sign in with Apple](#sign-in-with-apple)
- [Passkeys (WebAuthn)](#passkeys-webauthn)
- [OAuth & ASWebAuthenticationSession](#oauth--aswebauthenticationsession)
- [Password AutoFill](#password-autofill)
- [Biometric Authentication (LocalAuthentication)](#biometric-authentication-localauthentication)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)
## Sign in with Apple
Add the **Sign in with Apple** capability in Xcode.
In SwiftUI, use `SignInWithAppleButton`:
```swift
import SwiftUI
import AuthenticationServices
struct LoginView: View {
var body: some View {
SignInWithAppleButton(.signIn) { request in
request.requestedScopes = [.fullName, .email]
} onCompletion: { result in
switch result {
case .success(let authorization):
if let appleIDCredential = authorization.credential as? ASAuthorizationAppleIDCredential {
let userIdentifier = appleIDCredential.user
let identityToken = appleIDCredential.identityToken
// Forward identityToken to backend for JWT validation
}
case .failure(let error):