말하는 컴공감자의 텃밭

Git Oauth 활용 로그인 하기 본문

Tool/git

Git Oauth 활용 로그인 하기

현콩 2024. 1. 18. 11:58
728x90

GitHub Finder을 만드는 과제가 있어 진행하던 중 

Git Oauth이 필요해서 사용법을 정리한다.

 

OAuth application 등록하고 client_id 랑 client_secret 값을 알아내야했다.

 

// 링크

register 

 

GitHub: Let’s build from here

GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea...

github.com

 

 

홈페이지 URL 이랑 콜백 URL을 작성해주면

 

 

Client ID를 얻을 수 있다.

 

 

우측하단 Generate a new client secret을 누르면 Client secrets를 얻을 수 있다.

 

class Github {
  constructor() {
    this.client_id = "cac010b61d2e616072ea"; // oauth id
    this.client_secret = "7d69d0db3f2a29adb329ca9aa85d411b338daaca";
    this.repos_count = 5;
    this.repos_sort = "created: asc";
  }

 

위 코드를 활용하여 GitHub 데이터를 파싱할 수 있었다.

 

 

 

728x90

'Tool > git' 카테고리의 다른 글

서브모듈 - subModule  (0) 2024.05.14
Git 하위 폴더만 가져오기 - sparseCheckout  (0) 2024.01.16
GitHub 정리 - 알고리즘 스터디 관리 편  (1) 2024.01.04
git 화살표 폴더  (0) 2023.10.31
git - 프로젝트 올리기  (0) 2023.03.07
Comments