

250617 김혜민 소셜로그인 콜백에러 수정 2
@11f94d1d73d451b8ecf92e1bacf0e23888f49a7a
--- client/views/pages/login/Login.vue
+++ client/views/pages/login/Login.vue
... | ... | @@ -309,9 +309,14 @@ |
309 | 309 |
if (token) { |
310 | 310 |
headers['Authorization'] = token.startsWith('Bearer ') ? token : `Bearer ${token}`; |
311 | 311 |
} |
312 |
- |
|
313 |
- const response = await getUserInfo(); |
|
314 |
- |
|
312 |
+ const response = await fetch('/oauth2/getUserInfo.json', { |
|
313 |
+ method: 'POST', |
|
314 |
+ headers: headers, |
|
315 |
+ credentials: 'include' |
|
316 |
+ }); |
|
317 |
+ |
|
318 |
+ |
|
319 |
+ |
|
315 | 320 |
if (response.status === 200) { |
316 | 321 |
const result = await response.json(); |
317 | 322 |
|
... | ... | @@ -341,8 +346,15 @@ |
341 | 346 |
|
342 | 347 |
async handleOAuthSession() { |
343 | 348 |
try { |
344 |
- |
|
345 |
- const userInfoRes = await getUserInfo(); |
|
349 |
+ |
|
350 |
+ const userInfoRes = await fetch('/oauth2/getUserInfo.json', { |
|
351 |
+ method: 'POST', |
|
352 |
+ credentials: 'include', |
|
353 |
+ headers: { |
|
354 |
+ 'Content-Type': 'application/json', |
|
355 |
+ 'Cache-Control': 'no-cache' |
|
356 |
+ } |
|
357 |
+ }); |
|
346 | 358 |
|
347 | 359 |
if (!userInfoRes || userInfoRes.status !== 200) { |
348 | 360 |
throw new Error('세션 정보를 가져올 수 없습니다.'); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?