diff options
Diffstat (limited to 'components/login/saml-login-button.tsx')
| -rw-r--r-- | components/login/saml-login-button.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/login/saml-login-button.tsx b/components/login/saml-login-button.tsx index c0aae0f1..02825e2f 100644 --- a/components/login/saml-login-button.tsx +++ b/components/login/saml-login-button.tsx @@ -32,8 +32,14 @@ export function SAMLLoginButton({ try { setIsLoading(true) + // 현재 페이지 경로를 RelayState로 설정 (로그인 후 이 페이지로 돌아옴) + const currentPath = window.location.pathname + window.location.search + const relayState = encodeURIComponent(currentPath) + + console.log('Setting RelayState to:', currentPath) + // API 엔드포인트를 통해 SAML AuthnRequest URL 생성 - const response = await fetch('/api/auth/saml/authn-request', { + const response = await fetch(`/api/auth/saml/authn-request?relayState=${relayState}`, { method: 'GET', headers: { 'Content-Type': 'application/json', |
