diff options
| author | joonhoekim <26rote@gmail.com> | 2025-06-23 12:56:54 +0000 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-06-23 12:56:54 +0000 |
| commit | 1e46c2f3523f0f73a7ed378e9281dec24b23f8f8 (patch) | |
| tree | 62438a757a4aadc8d9aa6924bd3756a919fe2303 /components/login/saml-login-button.tsx | |
| parent | ebe273ef4564d55f9bf193adc51a9e58211e72e9 (diff) | |
(김준회) SAML 2.0 relay-state 처리 및 redirect 상태코드 문제 디버깅
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', |
