Ios Networking
ASecurityStore tokens securely in the Keychain, not in `UserDefaults` or hardcoded in code. For requests, inject the token into every `URLRequest` as: `Authorization: Bearer <token>` Good pattern on iOS: - Keep a small auth/token store that reads the current access token from Keychain - Centralize request building so auth headers are added in one place - If you use Alamofire, use a `RequestInterceptor` to attach the bearer token automatically - On `401 Unauthorized`, refresh the token, save the new to...
- 584 stars
- 0 votes
- 0 copies
- 1 view
- Added September 5, 2026
Works with
Security analysis
100/100Pro scans all 11 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill ios-networking --agent claude-codeAre you the author of Ios Networking?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-ios-networking-70fd528c)Store tokens securely in the Keychain, not in `UserDefaults` or hardcoded in code.
For requests, inject the token into every `URLRequest` as:
`Authorization: Bearer <token>`
Good pattern on iOS:
- Keep a small auth/token store that reads the current access token from Keychain
- Centralize request building so auth headers are added in one place
- If you use Alamofire, use a `RequestInterceptor` to attach the bearer token automatically
- On `401 Unauthorized`, refresh the token, save the new token, and retry the request once
- Set reasonable request timeouts and avoid leaking tokens into logs
If you use `URLSession`, wrap this in an API client so token handling is not repeated across screens. If you use Alamofire, `RequestInterceptor` is the cleanest place for both header injection and refresh-on-retry behavior.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.