# Ios Add Auth

> Add authentication to an iOS app with Sign in with Apple, biometrics, and Keychain storage.

- **Type:** Skill
- **Install:** `agentstack add skill-edfenton-claude-skills-ios-add-auth`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [edfenton](https://agentstack.voostack.com/s/edfenton)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [edfenton](https://github.com/edfenton)
- **Source:** https://github.com/edfenton/claude-skills/tree/main/ios/ios-add-auth

## Install

```sh
agentstack add skill-edfenton-claude-skills-ios-add-auth
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Purpose
Add secure authentication to an existing iOS project using Apple-native approaches.

## Arguments
- `--providers ` — Comma-separated providers (default: `apple,biometric`)
  - `apple` — Sign in with Apple
  - `biometric` — Face ID / Touch ID
  - `credentials` — Email/password (requires backend)
- `--with-backend` — Include API client for backend auth

## What gets created

```
Services/
├── Auth/
│   ├── AuthService.swift           # Main auth service
│   ├── AuthState.swift             # Auth state enum
│   ├── KeychainManager.swift       # Secure token storage
│   ├── BiometricAuthManager.swift  # Face ID / Touch ID
│   └── SignInWithAppleManager.swift

Features/
├── Auth/
│   ├── SignInView.swift            # Sign-in screen
│   ├── SignInViewModel.swift
│   └── AuthenticatedContainer.swift # Wraps authenticated content

Models/
└── User.swift                      # User model
```

## Capabilities required

Add to Xcode project:
- **Sign in with Apple** capability (for `apple` provider)

Add to Info.plist:
- `NSFaceIDUsageDescription` — "Use Face ID to unlock the app"

## Keychain storage
- Access tokens stored in Keychain (not UserDefaults)
- Uses `kSecAttrAccessibleWhenUnlockedThisDeviceOnly`
- Biometric-protected option available

## Auth flow
1. Check for existing session (Keychain)
2. If biometrics enabled, prompt for Face ID/Touch ID
3. If no session, show sign-in screen
4. On successful auth, store tokens in Keychain
5. Handle token refresh (if backend)

## Workflow
1. Add Sign in with Apple capability in Xcode
2. Create auth services and managers
3. Create sign-in UI
4. Create authenticated container wrapper
5. Integrate with DependencyContainer
6. Add Info.plist entries
7. Test on device (biometrics require device)

## Security requirements
- Never store tokens in UserDefaults
- Use Keychain with appropriate accessibility
- Validate Sign in with Apple tokens server-side
- Handle biometric fallback gracefully
- Clear Keychain on sign-out

## Output
Summarize: providers configured, capabilities needed, UI components, security setup.

## Reference
For implementation details and security patterns, see `reference/ios-add-auth-reference.md`

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [edfenton](https://github.com/edfenton)
- **Source:** [edfenton/claude-skills](https://github.com/edfenton/claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-edfenton-claude-skills-ios-add-auth
- Seller: https://agentstack.voostack.com/s/edfenton
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
