toolcacheAI Coding Prompts › OAuth 2.0 Integration Guide

OAuth 2.0 Integration Guide

Implement OAuth 2.0 authentication with [PROVIDER: Google / GitHub / Apple / Microsoft / Facebook] in [FRAMEWORK].

Provide:
1. **Flow Diagram**: Authorization code flow step by step
2. **Provider Setup**: How to create OAuth app and get credentials
3. **Backend Implementation**: Routes for /auth/login, /auth/callback, /auth/logout
4. **Token Management**: Access token, refresh token, storage, rotation
5. **User Creation**: How to create/link user accounts from OAuth profile
6. **Session Handling**: JWT or session-based auth after OAuth
7. **Error Handling**: What can go wrong and how to handle each case
8. **Security Checklist**: State parameter, PKCE, token validation, redirect URI validation
9. **Frontend Integration**: How to trigger the flow from a "Sign in with X" button
10. **Testing**: How to test OAuth flows locally
🔒

Unlock this prompt

You have 5 free unlocks remaining

or
Get unlimited access from £2.99 →

How to use this prompt

Copy the prompt above and paste it into ChatGPT, Claude, Gemini, or any AI assistant. Replace the bracketed placeholders with your specific details.

Leave a Review

Tried this prompt? Let us know how it worked — your reviews help other users find the best prompts.

Get Unlimited Access →Browse All 2,400 Prompts