Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-10-19 19:41:30 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b28e64ab82fbd0cf9869c773a1661e87a93fb744
b28e64ab
1 parent
da160211
feat. kakao register / login
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
server/src/api/auth/auth.ctrl.js
server/src/api/auth/auth.ctrl.js
View file @
b28e64a
...
...
@@ -319,12 +319,19 @@ exports.socialRegister = async ctx => {
const
result
=
await
axios
.
get
(
url
,
{
headers
:
{
Authorization
:
`Bearer
${
accessToken
}
`
,
'Content-type'
:
'application/x-www-form-urlencoded;charset=utf-8'
,
},
});
console
.
log
(
result
);
const
{
email
,
profile
}
=
result
.
data
.
kakao_account
;
return
{
userId
:
email
,
userNm
:
profile
.
nickname
,
contact
:
`
${
email
}
_등록되지않은 번호`
,
birth
:
'등록되지않음'
,
};
return
result
;
}
:
()
=>
null
;
...
...
@@ -411,12 +418,11 @@ exports.socialLogin = async ctx => {
const
result
=
await
axios
.
get
(
url
,
{
headers
:
{
Authorization
:
`Bearer
${
accessToken
}
`
,
'Content-type'
:
'application/x-www-form-urlencoded;charset=utf-8'
,
},
});
console
.
log
(
result
);
return
result
;
return
result
.
data
.
kakao_account
.
email
;
}
:
()
=>
null
;
...
...
Please
register
or
login
to post a comment