forked from baron/baron-sso
Merge pull request 'fix/login' (#389) from fix/login into dev
Reviewed-on: baron/baron-sso#389
This commit is contained in:
@@ -380,3 +380,4 @@ function AppLayout() {
|
||||
}
|
||||
|
||||
export default AppLayout;
|
||||
// force reload
|
||||
|
||||
@@ -17,7 +17,7 @@ export const router = createBrowserRouter(
|
||||
element: <LoginPage />,
|
||||
},
|
||||
{
|
||||
path: "/auth/callback",
|
||||
path: "/callback",
|
||||
element: <AuthCallbackPage />,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -392,3 +392,4 @@ function AppLayout() {
|
||||
}
|
||||
|
||||
export default AppLayout;
|
||||
// force reload
|
||||
|
||||
@@ -11,6 +11,7 @@ export interface UserProfile {
|
||||
email: string;
|
||||
name: string;
|
||||
role: string;
|
||||
phone?: string;
|
||||
companyCode?: string;
|
||||
tenantId?: string;
|
||||
tenant?: Tenant;
|
||||
|
||||
@@ -29,7 +29,7 @@ apiClient.interceptors.response.use(
|
||||
async (error) => {
|
||||
if (error.response?.status === 401) {
|
||||
// 401 발생 시 로그인 페이지로 리다이렉트
|
||||
const isAuthPath = window.location.pathname.startsWith("/auth/callback");
|
||||
const isAuthPath = window.location.pathname.startsWith("/callback");
|
||||
const isLoginPath = window.location.pathname === "/login";
|
||||
const user = await userManager.getUser();
|
||||
// 인증 토큰이 없는 경우에만 로그인으로 보낸다.
|
||||
|
||||
@@ -5,11 +5,11 @@ export const oidcConfig: AuthProviderProps = {
|
||||
authority:
|
||||
import.meta.env.VITE_OIDC_AUTHORITY || "http://localhost:5000/oidc", // Gateway Proxy URL
|
||||
client_id: import.meta.env.VITE_OIDC_CLIENT_ID || "devfront",
|
||||
redirect_uri: `${window.location.origin}/auth/callback`,
|
||||
redirect_uri: `${window.location.origin}/callback`,
|
||||
response_type: "code",
|
||||
scope: "openid offline_access profile email", // offline_access for refresh token
|
||||
post_logout_redirect_uri: window.location.origin,
|
||||
popup_redirect_uri: `${window.location.origin}/auth/callback`,
|
||||
popup_redirect_uri: `${window.location.origin}/callback`,
|
||||
userStore: new WebStorageStateStore({ store: window.localStorage }),
|
||||
automaticSilentRenew: true,
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ filter_toml() {
|
||||
dest_file="$2"
|
||||
awk '
|
||||
function allowed(section) {
|
||||
return section ~ /^(ui\.userfront|msg\.userfront|err\.userfront|ui\.common)(\.|$)/;
|
||||
return section ~ /^(ui\.userfront|msg\.userfront|err\.userfront|ui\.common|domain)(\.|$)/;
|
||||
}
|
||||
BEGIN { keep = 0; }
|
||||
{
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
[domain]
|
||||
|
||||
[domain.affiliation]
|
||||
affiliate = "Affiliate"
|
||||
general = "General"
|
||||
|
||||
[domain.company]
|
||||
baron = "Baron"
|
||||
halla = "Halla"
|
||||
hanmac = "Hanmac"
|
||||
jangheon = "Jangheon"
|
||||
ptc = "PTC"
|
||||
saman = "Saman"
|
||||
|
||||
[domain.tenant_type]
|
||||
company = "Company"
|
||||
company_group = "Company Group"
|
||||
personal = "Personal"
|
||||
user_group = "User Group"
|
||||
|
||||
[err.userfront]
|
||||
|
||||
[err.userfront.auth_proxy]
|
||||
@@ -297,6 +317,7 @@ all = "All"
|
||||
admin_only = "Admin Only"
|
||||
assign = "Assign"
|
||||
back = "Back"
|
||||
back_to_login = "Back to login"
|
||||
cancel = "Cancel"
|
||||
change_file = "Change File"
|
||||
clear_search = "Clear Search"
|
||||
|
||||
@@ -1,3 +1,23 @@
|
||||
[domain]
|
||||
|
||||
[domain.affiliation]
|
||||
affiliate = "가족사 임직원"
|
||||
general = "일반 사용자"
|
||||
|
||||
[domain.company]
|
||||
baron = "바론"
|
||||
halla = "한라"
|
||||
hanmac = "한맥"
|
||||
jangheon = "장헌"
|
||||
ptc = "PTC"
|
||||
saman = "삼안"
|
||||
|
||||
[domain.tenant_type]
|
||||
company = "COMPANY (일반 기업)"
|
||||
company_group = "COMPANY_GROUP (그룹사/지주사)"
|
||||
personal = "PERSONAL (개인 워크스페이스)"
|
||||
user_group = "USER_GROUP (내부 부서/팀)"
|
||||
|
||||
[err.userfront]
|
||||
|
||||
[err.userfront.auth_proxy]
|
||||
@@ -297,6 +317,7 @@ all = "전체"
|
||||
admin_only = "관리자 전용"
|
||||
assign = "할당"
|
||||
back = "돌아가기"
|
||||
back_to_login = "로그인으로 돌아가기"
|
||||
cancel = "취소"
|
||||
change_file = "파일 변경"
|
||||
clear_search = "검색 초기화"
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
[domain]
|
||||
|
||||
[domain.affiliation]
|
||||
affiliate = ""
|
||||
general = ""
|
||||
|
||||
[domain.company]
|
||||
baron = ""
|
||||
halla = ""
|
||||
hanmac = ""
|
||||
jangheon = ""
|
||||
ptc = ""
|
||||
saman = ""
|
||||
|
||||
[err.userfront]
|
||||
|
||||
[err.userfront.auth_proxy]
|
||||
@@ -297,6 +311,7 @@ all = ""
|
||||
admin_only = ""
|
||||
assign = ""
|
||||
back = ""
|
||||
back_to_login = ""
|
||||
cancel = ""
|
||||
change_file = ""
|
||||
clear_search = ""
|
||||
@@ -564,3 +579,13 @@ verify = ""
|
||||
|
||||
[ui.userfront.signup.success]
|
||||
action = ""
|
||||
|
||||
|
||||
# Auto-added missing keys
|
||||
|
||||
[domain.tenant_type]
|
||||
company = ""
|
||||
company_group = ""
|
||||
personal = ""
|
||||
user_group = ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user