summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
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) {