Skip to content

Commit

Permalink
Add dev-to-prod auth server change (#950)
Browse files Browse the repository at this point in the history
  • Loading branch information
BarVolunteering authored Sep 27, 2023
1 parent 93ecda1 commit f659f41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
REACT_APP_BASE_URL=https://www.anyway.co.il/
REACT_APP_REDIRECT_URL=/login-popup-redirect

REACT_APP_AUTH_URL=https://dev.anyway.co.il/
REACT_APP_AUTH_DEV_URL=https://dev.anyway.co.il/
REACT_APP_AUTH_PROD_URL=https://www.anyway.co.il/

# === Behaviour ===
# Card tags for dev / staging
Expand Down
6 changes: 4 additions & 2 deletions src/const/generalConst.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// pop up login window dimensions
import { isProd } from 'utils/env.utils';

// pop up login window dimensions

export const loginPopUpDim = {
width: window.screen.width / 3.5,
Expand All @@ -7,7 +9,7 @@ export const loginPopUpDim = {
//server url can be on dev or the heroku server
export const serverUrl = process.env.REACT_APP_BASE_URL;
export const ROLE_ADMIN_NAME = 'admins';
export const authServerUrl = process.env.REACT_APP_AUTH_URL;
export const authServerUrl = isProd ? process.env.REACT_APP_AUTH_PROD_URL : process.env.REACT_APP_AUTH_DEV_URL;
export const AUTH_LOGIN_GOOGLE_URL: URL = new URL(`${authServerUrl}authorize/google`);
export const REDIRECT_ROUTE: string | undefined = process.env.REACT_APP_REDIRECT_URL;
export const GET_USER_INFO_URL = `${authServerUrl}user/info`;
Expand Down

0 comments on commit f659f41

Please sign in to comment.