Install
$ agentstack add skill-rshankras-claude-code-apple-skills-auth-flow ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Auth Flow Generator
Generate a complete authentication flow with Sign in with Apple, biometric authentication (Face ID/Touch ID), and secure Keychain storage.
When This Skill Activates
Use this skill when the user:
- Asks to "add authentication" or "add login"
- Mentions "Sign in with Apple" or "SIWA"
- Wants "Face ID login" or "biometric auth"
- Asks about "Keychain" or "secure storage"
- Mentions "user session" or "auth token"
Pre-Generation Checks
1. Project Context Detection
- [ ] Check for existing auth implementations
- [ ] Check for AuthenticationServices framework usage
- [ ] Verify entitlements file exists
- [ ] Identify source file locations
2. Conflict Detection
Search for existing auth:
Glob: **/*Auth*.swift, **/*Keychain*.swift
Grep: "ASAuthorizationController" or "LAContext"
If found, ask user:
- Replace existing implementation?
- Extend with additional methods?
3. Required Capabilities
Sign in with Apple requires:
- Add "Sign in with Apple" capability in Xcode
- Configure in App Store Connect
- Add entitlement:
com.apple.developer.applesignin
Configuration Questions
Ask user via AskUserQuestion:
- Authentication methods? (multi-select)
- Sign in with Apple
- Biometrics (Face ID/Touch ID)
- Both
- Session storage?
- Keychain (secure, persists reinstall)
- UserDefaults (simple, cleared on reinstall)
- Session management?
- Auto-refresh tokens
- Manual refresh
- No token refresh needed
Generation Process
Step 1: Create Core Files
Generate these files:
AuthenticationManager.swift- Core auth orchestrationKeychainManager.swift- Secure storageSignInWithAppleManager.swift- SIWA handlingBiometricAuthManager.swift- Face ID/Touch ID
Step 2: Create SwiftUI Components
Based on configuration:
SignInWithAppleButton.swift- SwiftUI button wrapperAuthenticationView.swift- Complete auth UI
Step 3: Determine File Location
Check project structure:
- If
Sources/exists →Sources/Auth/ - If
App/exists →App/Auth/ - Otherwise →
Auth/
Entitlements Required
Sign in with Apple
com.apple.developer.applesignin
Default
Keychain Sharing (optional)
keychain-access-groups
$(AppIdentifierPrefix)com.yourcompany.shared
Info.plist Required
Face ID Usage Description
NSFaceIDUsageDescription
Use Face ID to securely sign in to your account
Output Format
After generation, provide:
Files Created
Sources/Auth/
├── AuthenticationManager.swift # Core orchestration
├── KeychainManager.swift # Secure storage
├── SignInWithAppleManager.swift # SIWA delegate
├── BiometricAuthManager.swift # Face ID/Touch ID
├── AuthenticationState.swift # Auth state model
└── Views/
├── SignInWithAppleButton.swift # SwiftUI button
└── AuthenticationView.swift # Complete UI
Integration Steps
App Entry Point:
@main
struct MyApp: App {
@State private var authManager = AuthenticationManager() // AuthenticationManager is @Observable
var body: some Scene {
WindowGroup {
if authManager.isAuthenticated {
ContentView()
} else {
AuthenticationView()
}
}
.environment(authManager)
}
}
Sign in with Apple Button:
SignInWithAppleButtonView { result in
switch result {
case .success(let user):
print("Signed in: \(user.id)")
case .failure(let error):
print("Failed: \(error)")
}
}
Biometric Auth:
Button("Unlock with Face ID") {
Task {
if await BiometricAuthManager.shared.authenticate() {
// Authenticated
}
}
}
Required Setup
- Xcode Capabilities:
- Add "Sign in with Apple" capability
- Enable Keychain Sharing (if needed)
- App Store Connect:
- Configure Sign in with Apple for your App ID
- Info.plist:
- Add
NSFaceIDUsageDescription
Testing Instructions
Sign in with Apple:
- Use Simulator for basic testing
- Test on device for full flow
- Use sandbox Apple ID for testing
Biometrics:
- Simulator: Features > Face ID > Enrolled
- Test enrolled/not enrolled states
- Test failed authentication
References
- auth-patterns.md - Security best practices
- templates/ - All template files
- Apple Docs: Authentication Services, LocalAuthentication
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: rshankras
- Source: rshankras/claude-code-apple-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.