File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,8 +202,11 @@ export const useSocialAuth = () => {
202202
203203 if ( parsedState ?. fromWebView ) {
204204 // WebView에서 온 경우 커스텀 스킴으로 복귀 (Android/iOS 모두 동일)
205+ // Chrome Custom Tabs에서 자동 리다이렉트 차단을 우회하기 위해 약간 지연
205206 const errorParam = `error=${ encodeURIComponent ( error ) } ` ;
206- window . location . href = `${ URL_SCHEME } ?${ errorParam } ` ;
207+ setTimeout ( ( ) => {
208+ window . location . href = `${ URL_SCHEME } ?${ errorParam } ` ;
209+ } , 100 ) ;
207210 } else {
208211 setError ( '로그인에 실패했습니다. 다시 시도해주세요.' ) ;
209212 setIsLoading ( false ) ;
@@ -217,8 +220,11 @@ export const useSocialAuth = () => {
217220
218221 if ( parsedState ?. fromWebView ) {
219222 // WebView에서 온 경우 커스텀 스킴으로 복귀 (Android/iOS 모두 동일)
223+ // Chrome Custom Tabs에서 자동 리다이렉트 차단을 우회하기 위해 약간 지연
220224 const params = `code=${ encodeURIComponent ( code ) } &provider=${ parsedState . provider || '' } &state=${ encodeURIComponent ( stateParam || '' ) } ` ;
221- window . location . href = `${ URL_SCHEME } ?${ params } ` ;
225+ setTimeout ( ( ) => {
226+ window . location . href = `${ URL_SCHEME } ?${ params } ` ;
227+ } , 100 ) ;
222228 } else {
223229 // 브라우저에서 온 경우: URL 파라미터 제거 후 처리하여 무한 루프 방지
224230 const provider = location . pathname . split ( '/' ) . at ( - 1 ) ;
You can’t perform that action at this time.
0 commit comments