Showing
1 changed file
with
11 additions
and
5 deletions
... | @@ -318,12 +318,19 @@ exports.socialRegister = async ctx => { | ... | @@ -318,12 +318,19 @@ exports.socialRegister = async ctx => { |
318 | const result = await axios.get(url, { | 318 | const result = await axios.get(url, { |
319 | headers : { | 319 | headers : { |
320 | Authorization : `Bearer ${accessToken}`, | 320 | Authorization : `Bearer ${accessToken}`, |
321 | + 'Content-type' : 'application/x-www-form-urlencoded;charset=utf-8', | ||
321 | }, | 322 | }, |
322 | }); | 323 | }); |
323 | 324 | ||
324 | - console.log(result); | 325 | + const { email, profile } = result.data.kakao_account; |
326 | + | ||
327 | + return { | ||
328 | + userId : email, | ||
329 | + userNm : profile.nickname, | ||
330 | + contact : `${email}_등록되지않은 번호`, | ||
331 | + birth : '등록되지않음', | ||
332 | + }; | ||
325 | 333 | ||
326 | - return result; | ||
327 | } : () => null; | 334 | } : () => null; |
328 | 335 | ||
329 | 336 | ||
... | @@ -410,12 +417,11 @@ exports.socialLogin = async ctx => { | ... | @@ -410,12 +417,11 @@ exports.socialLogin = async ctx => { |
410 | const result = await axios.get(url, { | 417 | const result = await axios.get(url, { |
411 | headers : { | 418 | headers : { |
412 | Authorization : `Bearer ${accessToken}`, | 419 | Authorization : `Bearer ${accessToken}`, |
420 | + 'Content-type' : 'application/x-www-form-urlencoded;charset=utf-8', | ||
413 | }, | 421 | }, |
414 | }); | 422 | }); |
415 | 423 | ||
416 | - console.log(result); | 424 | + return result.data.kakao_account.email; |
417 | - | ||
418 | - return result; | ||
419 | } : () => null; | 425 | } : () => null; |
420 | 426 | ||
421 | 427 | ... | ... |
-
Please register or login to post a comment