callback.html 파일 추가 및 OAuth 콜백 처리 로직 구현
package.json에 node-cron 및 node-fetch 의존성 추가 server.js에서 루트 경로에 대한 리다이렉트 로직 추가 .gitignore 파일 생성 public/index.html 및 callback/callback.html 파일 삭제
This commit is contained in:
parent
fdc903a3c1
commit
152f3ec045
6 changed files with 342 additions and 26 deletions
17
callback.html
Normal file
17
callback.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>OAuth Callback</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>처리 중입니다...</h2>
|
||||
|
||||
<script>
|
||||
const hash = window.location.hash.substring(1); // '#access_token=...'
|
||||
const params = new URLSearchParams(hash);
|
||||
const accessToken = params.get("access_token");
|
||||
|
||||
location.href = "/token?access_token=" + accessToken;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue