summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-06-23 06:44:34 +0000
committerjoonhoekim <26rote@gmail.com>2025-06-23 06:44:34 +0000
commitebe273ef4564d55f9bf193adc51a9e58211e72e9 (patch)
tree30e8c48be41d14751eceb4c24d88c18d03e9102b /components
parentabd9f950bbd95b9ad713a26d3fd8a7e0282b7c51 (diff)
(김준회 SAML 2.0 SSO 리팩터링, 디버깅 유틸리티 추가, MOCK 처리 추가
Diffstat (limited to 'components')
-rw-r--r--components/login/saml-login-button.tsx19
1 files changed, 18 insertions, 1 deletions
diff --git a/components/login/saml-login-button.tsx b/components/login/saml-login-button.tsx
index 2f23bedf..c0aae0f1 100644
--- a/components/login/saml-login-button.tsx
+++ b/components/login/saml-login-button.tsx
@@ -52,7 +52,24 @@ export function SAMLLoginButton({
console.log('SAML Login URL:', data.loginUrl)
- // IdP로 리다이렉트
+ // data URL인지 확인 (브라우저 보안 정책으로 차단될 수 있음)
+ if (data.loginUrl.startsWith('data:')) {
+ console.warn('⚠️ Data URL detected - this may be blocked by browser security policies')
+ toast({
+ title: '테스트 모드 감지',
+ description: 'Mock SAML IdP 모드가 활성화되어 있습니다. 프로덕션에서는 SAML_MOCKING_IDP=false로 설정하세요.',
+ variant: 'default',
+ })
+
+ // data URL 대신 Mock IdP 페이지로 직접 리다이렉트
+ const baseUrl = window.location.origin
+ const mockIdpUrl = `${baseUrl}/api/auth/saml/mock-idp`
+ console.log('🎭 Redirecting to Mock IdP instead:', mockIdpUrl)
+ window.location.href = mockIdpUrl
+ return
+ }
+
+ // 일반적인 URL로 리다이렉트
window.location.href = data.loginUrl
} catch (error) {