# authentication

Build iOS sign-in flows with Apple credentials, passkeys, OAuth and biometrics. Useful when an app needs credential-state handling and server-side token checks.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3900 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/authentication/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/authentication

## What it does

This skill covers iOS authentication with `AuthenticationServices` and `LocalAuthentication`. Its examples address Sign in with Apple, passkeys, OAuth through `ASWebAuthenticationSession`, Password AutoFill and biometric re-authentication. It also walks through `ASAuthorizationController` results and checking Apple credential status when the app starts, including what to do after access is revoked.

The server must validate or exchange the `identityToken` and authorization code; the app should not treat either as proof on its own. Before adding Sign in with Apple, enable the relevant app capability in Xcode. Passkeys have a domain requirement: configure the relying-party domain with the `webcredentials:` Associated Domain and an AASA entry.

For token checks, the skill describes using Apple’s public keys and validating `iss`, `aud` and `exp`. Client-side checks alone are not enough, so this distinction affects where the authentication boundary belongs.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill authentication -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/authentication/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/authentication/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill authentication -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/authentication/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill authentication -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/authentication/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills authentication
```

2. **Manually: put the files in place**
- File: `.github/skills/authentication/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill authentication -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/authentication
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/authentication/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill authentication -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/authentication/SKILL.md

## When to use it
- add Sign in with Apple to an iOS app
- handle revoked Apple credentials on app launch
- send an identity token for server validation
- configure passkey sign-in for an app domain
- add biometric re-authentication with `LAContext`

## Example prompts
- Implement Sign in with Apple and handle the `ASAuthorizationController` result.
- Check Apple credential status when the app launches and sign out after revocation.
- Set up passkey sign-in for my app domain and explain the Associated Domain requirements.

## Similar
- [vercel-react-native-skills](https://affpapa.org/en/nevibecode/skills/vercel-react-native-skills.md) — skill · 255200 installs
- [animate-expo](https://affpapa.org/en/nevibecode/skills/animate-expo.md) — skill · 137900 installs
- [mobile-native](https://affpapa.org/en/nevibecode/skills/mobile-native.md) — skill · 86600 installs
- [aso](https://affpapa.org/en/nevibecode/skills/aso.md) — skill · 75400 installs
- [swiftui-pro](https://affpapa.org/en/nevibecode/skills/swiftui-pro.md) — skill · 35200 installs
- [orca-emulator](https://affpapa.org/en/nevibecode/skills/orca-emulator.md) — skill · 5800 installs

## Other versions with the same name
- [authentication · codewithmukesh](https://affpapa.org/en/nevibecode/skills/codewithmukesh-authentication.md) — 2800 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
