Skip to content

Commit

Permalink
Use RE domain for API and Auth endpoints (#2399)
Browse files Browse the repository at this point in the history
  • Loading branch information
ottaviano committed Jul 17, 2023
1 parent a5a502b commit 1bf9ab6
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -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=
Expand Down
4 changes: 0 additions & 4 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Logout/Logout.jsx
Original file line number Diff line number Diff line change
@@ -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 = () => {
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/shared/environments.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -17,7 +16,6 @@ export {
MAPBOX_STYLE,
OAUTH_HOST,
API_HOST,
RENAISSANCE_HOST,
UNLAYER_PROJECT_ID,
APP_VERSION,
APP_ENVIRONMENT,
Expand Down

0 comments on commit 1bf9ab6

Please sign in to comment.