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

@@ -207,7 +207,7 @@ export const AuthProvider = (props: { children: JSX.Element }) => {
### Google OAuth
1. [Google Cloud Console](https://console.cloud.google.com/)
2. **APIs & Services****Credentials****OAuth 2.0 Client ID**
3. **Authorized redirect URIs**: `https://your-domain.com/oauth/google/callback`
3. **Authorized redirect URIs**: `https://v3.discours.io/oauth/google/callback`
```bash
GOOGLE_CLIENT_ID=your_google_client_id
@@ -217,7 +217,7 @@ GOOGLE_CLIENT_SECRET=your_google_client_secret
### 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`
```bash
GITHUB_CLIENT_ID=your_github_client_id
@@ -227,7 +227,7 @@ GITHUB_CLIENT_SECRET=your_github_client_secret
### 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`
```bash
@@ -238,7 +238,7 @@ YANDEX_CLIENT_SECRET=your_yandex_client_secret
### 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`
```bash
VK_CLIENT_ID=your_vk_app_id
@@ -333,13 +333,13 @@ test('OAuth flow with httpOnly cookies', async ({ page }) => {
### Отладка
```bash
# Проверка OAuth провайдеров
curl -v "https://your-domain.com/oauth/google/login"
curl -v "https://v3.discours.io/oauth/google/login"
# Проверка callback
curl -v "https://your-domain.com/oauth/google/callback?code=test&state=test"
curl -v "https://v3.discours.io/oauth/google/callback?code=test&state=test"
# Проверка сессии с cookie
curl -b "session_token=your_token" "https://your-domain.com/graphql" \
curl -b "session_token=your_token" "https://v3.discours.io/graphql" \
-d '{"query":"query { getSession { success author { id } } }"}'
```