Skip to content

Commit

Permalink
Merge pull request #152 from modern-agile-team/feature/auth
Browse files Browse the repository at this point in the history
fix(NicoDora/auth) : 네이버 연동해제 오류 수정
  • Loading branch information
NicoDora authored Nov 28, 2023
2 parents b6b7dbf + 3a95e78 commit be9901f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/auth/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,19 @@ export class AuthService {
const naverUnlinkUrl = 'https://nid.naver.com/oauth2.0/token';
const naverUnlinkHeader = {
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
};

const naverUnlinkBody = {
client_id: process.env.NAVER_CLIENT_ID,
client_secret: process.env.NAVER_CLIENT_SECRET,
grant_type: 'delete',
service_provider: 'NAVER',
access_token: accessToken,
};

axios.post(naverUnlinkUrl, naverUnlinkBody, naverUnlinkHeader);
await axios.post(naverUnlinkUrl, naverUnlinkBody, naverUnlinkHeader);
return { message: '네이버 연동 해제가 완료되었습니다.' };
} catch (error) {
console.log(error);
Expand Down

0 comments on commit be9901f

Please sign in to comment.