Skip to content

Commit

Permalink
release 1.0.3
Browse files Browse the repository at this point in the history
1. fixed login error by @app6460
  • Loading branch information
naijun0403 authored Sep 23, 2022
2 parents 45efd29 + 54ddb3e commit 26e11f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 4 additions & 1 deletion CHANGE_LOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@
## 1.0.2
1. `KakaoApiService`에서 리다이렉트가 계속되며, 로그인이 안되던 버그가 수정되었습니다.

2. `KakaoDevClient``debugUrl`로 카카오 서버를 경우해 url을 scrap 할 수 있습니다.
2. `KakaoDevClient``debugUrl`로 카카오 서버를 경우해 url을 scrap 할 수 있습니다.

## 1.0.3
1. `KakaoApiService`에서 로그인이 안되던 버그가 수정되었습니다.
12 changes: 8 additions & 4 deletions src/service/kakao-api-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,13 @@ exports.KakaoApiService = /** @class */ (function () {
Referer: 'https://accounts.kakao.com/'
}
).then(_ => {
const parsedData = e.parse();
const dataElement = e.parse().getElementById('__NEXT_DATA__');

if (!dataElement) reject('Cannot get next data.');

const cryptoKey = parsedData.select('input[name=p]').attr('value');
const nextData = JSON.parse(dataElement.data()).props.pageProps.pageContext.commonContext;

const cryptoKey = nextData.p;

this.client.changeHost('accounts.kakao.com');
this.client.request(
Expand All @@ -96,7 +100,7 @@ exports.KakaoApiService = /** @class */ (function () {
continue: decodeURIComponent(referer.split('=')[1]),
third: 'false',
k: 'true',
authenticity_token: String(parsedData.select('head > meta:nth-child(3)').attr('content'))
authenticity_token: String(nextData._csrf)
},
{
Referer: referer
Expand Down Expand Up @@ -138,7 +142,7 @@ exports.KakaoApiService = /** @class */ (function () {
* @return {string}
*/
KakaoApiService.getReleaseVersion = function () {
return "1.0.0";
return "1.0.3";
}

/**
Expand Down

0 comments on commit 26e11f1

Please sign in to comment.