Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

동작 흐름

  1. index.html의 "DataGSM으로 로그인" 버튼 클릭
  2. /login 라우트에서 code_verifier / code_challenge(PKCE)를 생성하고 DataGSM 인가 서버(oauth.authorization.datagsm.kr)로 리다이렉트
  3. 사용자가 DataGSM에서 로그인/동의를 마치면 redirect_uri(=/callback)로 code가 전달됨(콜백)
  4. /callback에서 code + code_verifier로 access token 교환
  5. access token으로 oauth.resource.datagsm.kr/userinfo 호출 → 학생 정보 획득
  6. console.dir(studentData, { depth: null })로 JS Object 형식 그대로 서버 콘솔에 출력
    • 브라우저에도 JSON으로 응답

실행 방법

npm install
cp .env.example .env
# .env 열어서 DATAGSM_CLIENT_ID, REDIRECT_URI 채우기
npm start

브라우저에서 http://localhost:3000 접속 → 버튼 클릭 → 로그인 → 콘솔에서 학생 정보 확인.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages