Implement secure API authentication with JWT, OAuth, or API keys
Implement API authentication for: Authentication Method: [JWT/OAuth2/API Keys/Session-based] Framework: [Express/FastAPI/Django/Spring/etc.] User Storage: [DATABASE TYPE] Requirements: - Multi-tenancy: [YES/NO] - Token refresh: [REQUIRED/NOT NEEDED] - Scopes/permissions: [LIST IF APPLICABLE] - Social login: [PROVIDERS IF NEEDED] Please provide: 1. Complete authentication flow implementation 2. Token generation and validation code 3. Middleware/decorator for protected routes 4. Refresh token handling (if applicable) 5. Security best practices implementation 6. Error handling for auth failures
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[DATABASE TYPE][LIST IF APPLICABLE][PROVIDERS IF NEEDED]