This commit is contained in:
2025-09-29 17:57:45 +03:00
parent 9b284852e9
commit 1e9a6a07c1
3 changed files with 15 additions and 15 deletions

View File

@@ -44,24 +44,24 @@ LOCKOUT_DURATION=1800 # 30 минут
1. [Google Cloud Console](https://console.cloud.google.com/)
2. **APIs & Services****Credentials****Create OAuth 2.0 Client ID**
3. **Authorized redirect URIs**:
- `https://your-domain.com/oauth/google/callback` (продакшн)
- `https://v3.discours.io/oauth/google/callback` (продакшн)
- `http://localhost:8000/oauth/google/callback` (разработка)
#### GitHub OAuth
1. [GitHub Developer Settings](https://github.com/settings/developers)
2. **New OAuth App**
3. **Authorization callback URL**: `https://your-domain.com/oauth/github/callback`
3. **Authorization callback URL**: `https://v3.discours.io/oauth/github/callback`
#### Yandex OAuth
1. [Yandex OAuth](https://oauth.yandex.ru/)
2. **Создать новое приложение**
3. **Callback URI**: `https://your-domain.com/oauth/yandex/callback`
3. **Callback URI**: `https://v3.discours.io/oauth/yandex/callback`
4. **Права**: `login:info`, `login:email`, `login:avatar`
#### VK OAuth
1. [VK Developers](https://dev.vk.com/apps)
2. **Создать приложение****Веб-сайт**
3. **Redirect URI**: `https://your-domain.com/oauth/vk/callback`
3. **Redirect URI**: `https://v3.discours.io/oauth/vk/callback`
### 3. Проверка настройки
@@ -83,7 +83,7 @@ async def test():
asyncio.run(test())"
# Проверка OAuth провайдеров
curl -v "https://your-domain.com/oauth/google/login"
curl -v "https://v3.discours.io/oauth/google/login"
```
## 🔒 Безопасность в продакшене
@@ -131,7 +131,7 @@ echo $GOOGLE_CLIENT_SECRET
#### "Cookies не работают"
```bash
# Проверить настройки cookie
curl -v -b "session_token=test" "https://your-domain.com/graphql"
curl -v -b "session_token=test" "https://v3.discours.io/graphql"
# Проверить что фронтенд отправляет credentials
# В коде должно быть: credentials: 'include'