Skip to content

Commit c1fc86c

Browse files
Ubuntuhyohyeok1
Ubuntu
andcommitted
refactor: Changed variable names
Co-authored-by: hyohyeok1 <hyohyeokjeong@cryptolab.co.kr>
1 parent d4201c1 commit c1fc86c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

.env.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ export CODER_OIDC_REDIRECT_URI="$BASE_URL/api/v2/users/oidc/callback"
1515
export CODER_OIDC_LOGOUT_URI="https://oidc.logout.url"
1616
export CODER_OIDC_TOKEN_PATH="/home/ubuntu/.coder/tokens"
1717

18-
# if VITE_IS_CI_BUILD variable is true, CODER_DISABLE_PASSWORD_AUTH variable must be false
19-
export VITE_IS_CI_BUILD=true
18+
# if VITE_DISABLE_EXTERNAL_LOGIN_PAGE variable is true, CODER_DISABLE_PASSWORD_AUTH variable must be false
19+
export VITE_DISABLE_EXTERNAL_LOGIN_PAGE=true
2020
export CODER_DISABLE_PASSWORD_AUTH=false

site/src/@types/vite-env.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ interface ViteTypeOptions {
55
}
66

77
interface ImportMetaEnv {
8-
readonly VITE_IS_CI_BUILD: string
8+
readonly VITE_DISABLE_EXTERNAL_LOGIN_PAGE: string
99
}
1010

1111
interface ImportMeta {

site/src/pages/LoginPage/LoginPage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ export const LoginPage: FC = () => {
7171
}
7272
}
7373

74-
const isCI = import.meta.env.VITE_IS_CI_BUILD === "true"
74+
const disableExternalLoginPage = import.meta.env.VITE_DISABLE_EXTERNAL_LOGIN_PAGE === "true";
7575

76-
if (!isSignedIn && !isCI) {
76+
if (!isSignedIn && !disableExternalLoginPage) {
7777
window.location.replace(`https://heaan.io`);
7878
return null;
7979
}

0 commit comments

Comments
 (0)