Files
atabackend/test_github.sh
Beyhan Oğur d50f14bcb1 first commit
2026-04-26 22:20:45 +03:00

35 lines
783 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# GitHub OAuth Test Script
# Usage: ./test_github.sh <access_token>
if [ -z "$1" ]; then
echo "❌ Access token gerekli!"
echo ""
echo "Kullanım: ./test_github.sh <access_token>"
echo ""
echo "Personal Access Token almak için:"
echo "1. https://github.com/settings/tokens"
echo "2. Generate new token (classic)"
echo "3. Scopes: user, user:email"
echo "4. Token'ı kopyala"
exit 1
fi
ACCESS_TOKEN="$1"
echo "⚫ GitHub OAuth Test"
echo "===================="
echo ""
echo "📤 Request gönderiliyor..."
echo ""
curl -X POST http://localhost:8000/api/v1/auth/social/github/ \
-H "Content-Type: application/json" \
-d "{\"access_token\":\"$ACCESS_TOKEN\"}" \
| python -m json.tool
echo ""
echo "===================="