From 1bf9ab6f2a885650c96c2d202ad14c322f0585b6 Mon Sep 17 00:00:00 2001 From: Dimitri Gritsajuk Date: Mon, 17 Jul 2023 17:48:13 +0200 Subject: [PATCH] Use RE domain for API and Auth endpoints (#2399) --- .env | 1 - .github/actions/deploy/action.yml | 4 ---- .github/workflows/ci-cd.yaml | 2 -- src/components/Logout/Logout.jsx | 4 ++-- src/shared/environments.js | 2 -- 5 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.env b/.env index 41c85e3cf..d591daf10 100644 --- a/.env +++ b/.env @@ -1,5 +1,4 @@ REACT_APP_API_HOST= -REACT_APP_RENAISSANCE_HOST= REACT_APP_OAUTH_HOST= REACT_APP_OAUTH_CLIENT_ID= REACT_APP_INTERNAL_APP_ID= diff --git a/.github/actions/deploy/action.yml b/.github/actions/deploy/action.yml index e448afb16..b20c19698 100644 --- a/.github/actions/deploy/action.yml +++ b/.github/actions/deploy/action.yml @@ -29,9 +29,6 @@ inputs: react_app_api_host: description: The API host used by the app required: true - react_app_renaissance_host: - description: The RE site host - required: true react_app_oauth_client_id: description: The OAuth client id used by the app required: true @@ -73,7 +70,6 @@ runs: run: |- echo "" > .env.production echo "REACT_APP_API_HOST=${{ inputs.react_app_api_host }}" >> .env.production - echo "REACT_APP_RENAISSANCE_HOST=${{ inputs.react_app_renaissance_host }}" >> .env.production echo "REACT_APP_OAUTH_HOST=${{ inputs.react_app_oauth_host }}" >> .env.production echo "REACT_APP_OAUTH_CLIENT_ID=${{ inputs.react_app_oauth_client_id }}" >> .env.production echo "REACT_APP_INTERNAL_APP_ID=${{ inputs.react_app_internal_app_id }}" >> .env.production diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 47bf52e05..442317143 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -70,7 +70,6 @@ jobs: sentry_org: ${{ secrets.SENTRY_ORG }} sentry_project: ${{ secrets.SENTRY_PROJECT }} react_app_api_host: ${{ secrets.REACT_APP_API_HOST }} - react_app_renaissance_host: ${{ secrets.REACT_RENAISSANCE_HOST }} react_app_oauth_host: ${{ secrets.REACT_APP_OAUTH_HOST }} react_app_oauth_client_id: ${{ secrets.REACT_APP_OAUTH_CLIENT_ID }} react_app_internal_app_id: ${{ secrets.REACT_APP_INTERNAL_APP_ID }} @@ -103,7 +102,6 @@ jobs: sentry_org: ${{ secrets.SENTRY_ORG }} sentry_project: ${{ secrets.SENTRY_PROJECT }} react_app_api_host: ${{ secrets.REACT_APP_API_HOST }} - react_app_renaissance_host: ${{ secrets.REACT_RENAISSANCE_HOST }} react_app_oauth_host: ${{ secrets.REACT_APP_OAUTH_HOST }} react_app_oauth_client_id: ${{ secrets.REACT_APP_OAUTH_CLIENT_ID }} react_app_internal_app_id: ${{ secrets.REACT_APP_INTERNAL_APP_ID }} diff --git a/src/components/Logout/Logout.jsx b/src/components/Logout/Logout.jsx index 32b2ab90a..1863777f3 100644 --- a/src/components/Logout/Logout.jsx +++ b/src/components/Logout/Logout.jsx @@ -1,7 +1,7 @@ import { useEffect } from 'react' import { useDispatch, useSelector } from 'react-redux' import { userLogout } from '../../redux/auth' -import { RENAISSANCE_HOST, OAUTH_HOST } from 'shared/environments' +import { API_HOST, OAUTH_HOST } from 'shared/environments' import { isSwitchUser } from '../../redux/user/selectors' const Logout = () => { @@ -10,7 +10,7 @@ const Logout = () => { useEffect(() => { const logOutUrl = isSwitchedUser - ? `${RENAISSANCE_HOST}/admin/app/adherent/list?_switch_user=_exit` + ? `${API_HOST}/admin/app/adherent/list?_switch_user=_exit` : `${OAUTH_HOST}/deconnexion` dispatch(userLogout(isSwitchedUser)) window.location.href = logOutUrl diff --git a/src/shared/environments.js b/src/shared/environments.js index e35602806..a480f0f35 100644 --- a/src/shared/environments.js +++ b/src/shared/environments.js @@ -2,7 +2,6 @@ const MAPBOX_TOKEN = process.env.REACT_APP_MAPBOX_TOKEN const MAPBOX_STYLE = process.env.REACT_APP_MAPBOX_STYLE const OAUTH_HOST = process.env.REACT_APP_OAUTH_HOST const API_HOST = process.env.REACT_APP_API_HOST -const RENAISSANCE_HOST = process.env.REACT_APP_RENAISSANCE_HOST const UNLAYER_PROJECT_ID = process.env.REACT_APP_UNLAYER_PROJECT_ID const APP_VERSION = process.env.REACT_APP_VERSION const APP_ENVIRONMENT = process.env.REACT_APP_ENVIRONMENT @@ -17,7 +16,6 @@ export { MAPBOX_STYLE, OAUTH_HOST, API_HOST, - RENAISSANCE_HOST, UNLAYER_PROJECT_ID, APP_VERSION, APP_ENVIRONMENT,