diff --git a/.env.sample b/.env.sample index 198efb3..ebce42e 100644 --- a/.env.sample +++ b/.env.sample @@ -22,3 +22,4 @@ COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml VITE_AUTH_URL='https://ya-praktikum.tech/api/v2' VITE_SRC_URL='https://ya-praktikum.tech/api/v2/resources' VITE_AUTH_PATHNAMES='/sign-in, /sign-up' +VITE_OAUTH_REDIRECTURL='http://sokoly-tankwars-42.ya-praktikum.tech:3001' \ No newline at end of file diff --git a/packages/client/src/services/o-auth/YandexOAuth.tsx b/packages/client/src/services/o-auth/YandexOAuth.tsx index 3dd8f04..b02cd53 100644 --- a/packages/client/src/services/o-auth/YandexOAuth.tsx +++ b/packages/client/src/services/o-auth/YandexOAuth.tsx @@ -5,7 +5,7 @@ import { NavigateFunction } from 'react-router-dom' import { toast } from 'react-toastify' const BASE_URL = import.meta.env.VITE_AUTH_URL -const REDIRECT_URI = 'http://localhost:3000' +const REDIRECT_URI = import.meta.env.VITE_OAUTH_REDIRECTURL || 'http://localhost:3000' const YANDEX_AUTH_LINK = 'https://oauth.yandex.ru/authorize' export class YandexOAuth {