Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dev-to-prod auth server change #950

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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