# OAuth 2.0 Analysis Examples

## Example 1: Grant Type Selection

**Input:**
```
Which OAuth 2.0 grant type should I use for a React SPA?
```

**Expected Output:**
Authorization Code flow with PKCE for public clients, no client secret, code_challenge/code_verifier for security, implementation guidance.

## Example 2: PKCE Explanation

**Input:**
```
Explain how PKCE protects against authorization code interception.
```

**Expected Output:**
Code verifier generation, SHA256 challenge, authorization code becomes useless without verifier, prevents code injection attacks.

## Example 3: Token Refresh Pattern

**Input:**
```
Design a token refresh strategy for a mobile app.
```

**Expected Output:**
Short-lived access tokens, long-lived refresh tokens, automatic refresh before expiration, secure storage in keychain, token rotation.

## Common Use Cases

- OAuth implementation
- Third-party integration
- SSO design
- Mobile/SPA authentication
- Security review
