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 9309
공지 [계속 추가중] Keycloak 용어 및 설정 옵션 정의 황제낙엽 2024.02.02 9391
67 docker keycloak 에 ssl 적용하기 위한 학습용 포스팅 모음 황제낙엽 2024.01.31 2200
66 Keycloak 설치 관련 레퍼런스들 (with docker) 황제낙엽 2024.01.22 2185
65 docker 를 이용하여 keycloak 실행 환경을 구축하는 포스팅 모음 (docker compose 포함) 황제낙엽 2024.01.22 2608
64 KeyCloak 을 활용하여 사용자 인증을 처리하는 과정에 대한 포스팅 모음 황제낙엽 2024.01.20 2093
63 [POST/2020.11.10] KeyCloak의 REST API 이용해서 JWT 발급과 검증 file 황제낙엽 2024.01.20 2690
62 SAML roles 에 대하여 황제낙엽 2024.01.20 2070
61 무료 Authorization Server 솔루션 황제낙엽 2024.01.18 2269
60 Keycloak 에 대하여 황제낙엽 2024.01.18 2037
» OAuth2 구글(Google), Github, 카카오(Kakao), 네이버(Naver) 로그인 API 목록 황제낙엽 2023.12.17 2155
58 Spring Authorization Server 관련 포스트 목록과 인프런 강의 황제낙엽 2023.12.07 2253
57 [POST/2023.05.22] OAuth 2.1 Authorization Server (Spring Security) 구축 후기 file 황제낙엽 2023.12.03 2700
56 OAuth 와 JWT 내용 정리 (개념 정의 및 적용 전략) file 황제낙엽 2023.12.03 2438
55 [Copilot, Bard] oauth claim 의 의미 황제낙엽 2023.12.02 2056
54 [reference links] windows + let's encrypt 황제낙엽 2023.03.23 68910
53 WIN-ACME 황제낙엽 2022.09.17 2139
52 Apache Log4j 2 보안 업데이트 권고 황제낙엽 2021.12.13 2423
51 [Let's Encrypt] certbot 을 이용한 인증서 갱신 실패 기록 황제낙엽 2021.07.03 2136
50 DNS TXT Record 적용 후 조회 명령어 (windows 와 web url) 황제낙엽 2021.07.01 2074
49 SSL 인증서 파일 포맷 종류 - crt, cer, csr, pem, der, pfx, p12, jks, key 황제낙엽 2020.07.20 2329
48 certbot docker 를 이용한 인증서 발급 및 갱신(Let's Encrypt-DNS를 통해 도메인 인증) file 황제낙엽 2020.07.14 2837