@@ -79,9 +79,7 @@ export const useSocialAuth = () => {
7979 ) ;
8080
8181 const handleOAuthCallback = useCallback (
82- async ( code : string , provider : string , state : string ) => {
83- console . log ( '🔵 [웹] handleOAuthCallback 시작:' , { code, provider, state } ) ;
84-
82+ async ( code : string , provider : string , _state : string ) => {
8583 clearAuthInfo ( ) ;
8684 setIsLoading ( true ) ;
8785 setError ( null ) ;
@@ -90,10 +88,7 @@ export const useSocialAuth = () => {
9088 // API는 state로 redirect URI의 base64 인코딩 값을 기대합니다
9189 const redirectUri = window . location . origin + `/login/oauth2/code/${ provider } ` ;
9290 const apiState = btoa ( redirectUri ) ;
93-
94- console . log ( '🔵 [웹] fetchOAuth2Login 호출 시작' , { redirectUri, apiState } ) ;
9591 const res = await fetchOAuth2Login ( code , apiState , provider as ProviderKey ) ;
96- console . log ( '🔵 [웹] fetchOAuth2Login 응답:' , res ) ;
9792
9893 if ( res . state === 'NEED_REGISTER' ) {
9994 // WebView에서는 네이티브에 메시지 전송
@@ -167,12 +162,9 @@ export const useSocialAuth = () => {
167162 const handleWebViewMessage = useCallback (
168163 ( event : MessageEvent ) => {
169164 try {
170- console . log ( '🔔 [웹] WebView 메시지 수신:' , event . data ) ;
171165 const { type, data } = JSON . parse ( event . data ) ;
172- console . log ( '🔔 [웹] 파싱된 메시지:' , { type, data } ) ;
173166
174167 if ( type === MESSAGE_TYPES . AUTH_SUCCESS ) {
175- console . log ( '✅ [웹] AUTH_SUCCESS 처리:' , data ) ;
176168 handleOAuthCallback ( data . code , data . provider , data . state || '' ) ;
177169 } else if ( type === MESSAGE_TYPES . AUTH_ERROR ) {
178170 console . error ( 'OAuth auth error:' , data . error ) ;
@@ -234,16 +226,13 @@ export const useSocialAuth = () => {
234226 // WebView 메시지 리스너 등록
235227 useEffect ( ( ) => {
236228 if ( ! isWebView ) {
237- console . log ( '⚠️ [웹] WebView 환경이 아님 - 메시지 리스너 미등록' ) ;
238229 return ;
239230 }
240231
241- console . log ( '✅ [웹] WebView 메시지 리스너 등록' ) ;
242232 window . addEventListener ( 'message' , handleWebViewMessage ) ;
243233 document . addEventListener ( 'message' , handleWebViewMessage as EventListener ) ;
244234
245235 return ( ) => {
246- console . log ( '🗑️ [웹] WebView 메시지 리스너 제거' ) ;
247236 window . removeEventListener ( 'message' , handleWebViewMessage ) ;
248237 document . removeEventListener ( 'message' , handleWebViewMessage as EventListener ) ;
249238 } ;
0 commit comments