sitelink1 https://choiseokwon.tistory.com/389 
sitelink2  
sitelink3  
sitelink4  
extra_vars5  
extra_vars6  

간단히 각 플랫폼마다 로그인하고 유저 정보를 조회하는 방법이다.

 

Google

OAuth2 클라이언트 아이디와 리다이렉트 경로가 필요하다.

  • https://accounts.google.com/o/oauth2/v2/auth 에 forward, 코드 요청하고 (params: redirect_uri, client_id, access_type, response_type, prompt, scope, state (주로 리다이렉트 경로 + csrf) )
  • https://oauth2.googleapis.com/token 에 POST, 토큰 얻고 (params: grant_type=authorization_code, redirect_uri, client_id, code, client_secret)
  • https://www.googleapis.com/oauth2/v1/userinfo 에 GET, 유저 정보를 얻는다. (token에서 받은 ID Token으로 Bearer Auth + Access Token)

 

Github

OAuth2 클라이언트 아이디와 리다이렉트 경로가 필요하다.

  • https://github.com/login/oauth/authorize 에 forward, 코드 요청하고 (params: redirect_uri, client_id, access_type, scope, state (주로 리다이렉트 경로 + csrf) )
  • https://github.com/login/oauth/access_token 에 POST, 토큰 얻고 (params: client_id, code, client_secret, 이때 Accept: application/json 하면 json으로 쉽게 받을 수 있음)
  • https://api.github.com/user 에 GET, 유저 정보를 얻는다. (Bearer Auth (access token), User-Agent를 아무거나로 설정 안 하면 404 뜨는 것 같다)

 

네이버 (https://developers.naver.com/docs/login/web/web.md)

OAuth2 클라이언트 아이디와 리다이렉트 경로가 필요하다.

  • https://nid.naver.com/oauth2.0/authorize 에 forward, 코드 요청하고 (params: redirect_uri, client_id, state (주로 리다이렉트 경로 + csrf), response_type(code)  )
  • https://nid.naver.com/oauth2.0/token 에 POST, 토큰 얻고 (params: grant_type=authorization_code, redirect_uri, client_id, code, client_secret)
  • https://openapi.naver.com/v1/nid/me 에 GET, 유저 정보를 얻는다. (Access Token으로 Bearer Auth)

 

카카오 (https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api)

OAuth2 클라이언트 아이디와 리다이렉트 경로가 필요하다. 응답 JSON이 괴랄하다

  • https://kauth.kakao.com/oauth/authorize 에 forward, 코드 요청하고 (params: redirect_uri, client_id (REST API 키), response_type, state (주로 리다이렉트 경로 + csrf) )
  • https://kauth.kakao.com/oauth/token 에 POST, 토큰 얻고 (params: grant_type=authorization_code, redirect_uri, client_id (REST API 키), code)
  • https://kapi.kakao.com/v2/user/me 에 GET, 유저 정보를 얻는다. (Access Token으로 Bearer Auth)
번호 제목 글쓴이 날짜 조회 수
공지 [계속 추가중] SBOM 용어 정의 황제낙엽 2025.04.10 6068
공지 [계속 추가중] Keycloak 용어 및 설정 옵션 정의 황제낙엽 2024.02.02 6275
61 무료 Authorization Server 솔루션 황제낙엽 2024.01.18 1231
60 Keycloak 에 대하여 황제낙엽 2024.01.18 1177
» OAuth2 구글(Google), Github, 카카오(Kakao), 네이버(Naver) 로그인 API 목록 황제낙엽 2023.12.17 1137
58 Spring Authorization Server 관련 포스트 목록과 인프런 강의 황제낙엽 2023.12.07 1213
57 [POST/2023.05.22] OAuth 2.1 Authorization Server (Spring Security) 구축 후기 file 황제낙엽 2023.12.03 1584
56 OAuth 와 JWT 내용 정리 (개념 정의 및 적용 전략) file 황제낙엽 2023.12.03 1354
55 [Copilot, Bard] oauth claim 의 의미 황제낙엽 2023.12.02 1143
54 [reference links] windows + let's encrypt 황제낙엽 2023.03.23 61554
53 WIN-ACME 황제낙엽 2022.09.17 1219
52 Apache Log4j 2 보안 업데이트 권고 황제낙엽 2021.12.13 1364
51 [Let's Encrypt] certbot 을 이용한 인증서 갱신 실패 기록 황제낙엽 2021.07.03 1223
50 DNS TXT Record 적용 후 조회 명령어 (windows 와 web url) 황제낙엽 2021.07.01 1153
49 SSL 인증서 파일 포맷 종류 - crt, cer, csr, pem, der, pfx, p12, jks, key 황제낙엽 2020.07.20 1325
48 certbot docker 를 이용한 인증서 발급 및 갱신(Let's Encrypt-DNS를 통해 도메인 인증) file 황제낙엽 2020.07.14 1714
47 Certbot이란 황제낙엽 2020.07.14 1270
46 Let's Encrypt + Ubuntu 19.10 + Apache 2.4.41 secret 황제낙엽 2020.06.29 1
45 무료 SSL/TLS 인증서 Let's Encrypt(Linux+Apache) secret 황제낙엽 2020.04.05 17
44 SNI 기반 HTTPS 사이트 차단 file 황제낙엽 2020.03.04 1483
43 사설인증서 공인인증서 구분 방법 file 황제낙엽 2019.07.16 1276
42 Convert Certificate Format SSL 인증서 변환 가이드 황제낙엽 2019.03.29 1379