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

38 lines
1.0 KiB
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
# Google OAuth Test Script
# Usage: ./test_google.sh <access_token>
if [ -z "$1" ]; then
echo "❌ Access token gerekli!"
echo ""
echo "Kullanım: ./test_google.sh <access_token>"
echo ""
echo "Token almak için:"
echo "1. https://developers.google.com/oauthplayground/"
echo "2. Settings → Use your own OAuth credentials"
echo "3. Client ID: 915364976256-691m0s87as2r5vdbqr96f6humblseobt.apps.googleusercontent.com"
echo "4. Client Secret: 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"
echo "5. Scopes: userinfo.email, userinfo.profile"
echo "6. Authorize → Exchange code for tokens"
echo "7. Access token'ı kopyala"
exit 1
fi
ACCESS_TOKEN="$1"
echo "🔵 Google OAuth Test"
echo "===================="
echo ""
echo "📤 Request gönderiliyor..."
echo ""
curl -X POST http://localhost:8000/api/v1/auth/social/google-oauth2/ \
-H "Content-Type: application/json" \
-d "{\"access_token\":\"$ACCESS_TOKEN\"}" \
| python -m json.tool
echo ""
echo "===================="