hmkim 06-17
250617 김혜민 소셜로그인 콜백에러 수정 2
@11f94d1d73d451b8ecf92e1bacf0e23888f49a7a
client/views/pages/login/Login.vue
--- client/views/pages/login/Login.vue
+++ client/views/pages/login/Login.vue
@@ -309,9 +309,14 @@
         if (token) {
           headers['Authorization'] = token.startsWith('Bearer ') ? token : `Bearer ${token}`;
         }
-        
-        const response = await getUserInfo();
-        
+        const response = await fetch('/oauth2/getUserInfo.json', {
+          method: 'POST',
+          headers: headers,
+          credentials: 'include'
+        });
+
+
+
         if (response.status === 200) {
           const result = await response.json();
           
@@ -341,8 +346,15 @@
 
     async handleOAuthSession() {
       try {
-        
-        const userInfoRes = await getUserInfo();
+
+          const userInfoRes = await fetch('/oauth2/getUserInfo.json', {
+          method: 'POST',
+          credentials: 'include',
+          headers: {
+            'Content-Type': 'application/json',
+            'Cache-Control': 'no-cache'
+          }
+        });
         
         if (!userInfoRes || userInfoRes.status !== 200) {
           throw new Error('세션 정보를 가져올 수 없습니다.');
Add a comment
List