forked from baron/baron-sso
refactor: 별도의 /ssologin 경로 대신 기존 /signin 경로를 사용하도록 수정 #243
This commit is contained in:
@@ -32,7 +32,7 @@ function LoginPage() {
|
|||||||
const handleSSOLogin = (mode: "popup" | "redirect" = "popup") => {
|
const handleSSOLogin = (mode: "popup" | "redirect" = "popup") => {
|
||||||
const userfrontUrl = import.meta.env.USERFRONT_URL || "https://sso.hmac.kr";
|
const userfrontUrl = import.meta.env.USERFRONT_URL || "https://sso.hmac.kr";
|
||||||
const callbackUrl = `${window.location.origin}/auth/callback`;
|
const callbackUrl = `${window.location.origin}/auth/callback`;
|
||||||
const loginUrl = `${userfrontUrl}/ssologin?source=adminfront&redirect_uri=${encodeURIComponent(callbackUrl)}`;
|
const loginUrl = `${userfrontUrl}/signin?source=adminfront&redirect_uri=${encodeURIComponent(callbackUrl)}`;
|
||||||
|
|
||||||
if (mode === "redirect") {
|
if (mode === "redirect") {
|
||||||
window.location.href = loginUrl;
|
window.location.href = loginUrl;
|
||||||
|
|||||||
@@ -98,13 +98,6 @@ final _router = GoRouter(
|
|||||||
return LoginScreen(key: state.pageKey, loginChallenge: loginChallenge);
|
return LoginScreen(key: state.pageKey, loginChallenge: loginChallenge);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
GoRoute(
|
|
||||||
path: '/ssologin',
|
|
||||||
builder: (context, state) {
|
|
||||||
_routerLogger.info("Navigating to /ssologin");
|
|
||||||
return LoginScreen(key: state.pageKey);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: '/login',
|
path: '/login',
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
|
|||||||
Reference in New Issue
Block a user