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)
번호 제목 sitelink1 글쓴이 날짜 조회 수
공지 [계속 추가중] SBOM 용어 정의   황제낙엽 2025.04.10 52
공지 [계속 추가중] Keycloak 용어 및 설정 옵션 정의   황제낙엽 2024.02.02 631
19 Client ID, Client Secret (Credential) 에 대하여   황제낙엽 2024.03.11 122
18 OAuth 2.0 의 등장, 구성 요소, 인증 과정 file https://blog.naver.com/dsz08082/223024950520  황제낙엽 2024.03.11 140
17 Customizing the Login Page for Keycloak (Keycloak 로그인 페이지 사용자 정의) file https://www.baeldung.com/keycloak-custom-login-page  황제낙엽 2024.02.04 432
16 Access & Refresh token file https://letsmakemyselfprogrammer.tistory...sh%20token  황제낙엽 2024.02.03 108
15 OAuth 2.0 Client Types 별 Flow (인증 프로세스) file   황제낙엽 2024.02.02 115
14 [스프링 시큐리티 OAuth2] KeyCloak 실습 (Postman, Servlet) file   황제낙엽 2024.02.02 266
13 docker keycloak 에 ssl 적용 결과 후기   황제낙엽 2024.02.01 550
12 Keycloak 설치 관련 레퍼런스들 (with docker) https://www.keycloak.org/downloads  황제낙엽 2024.01.22 129
11 docker 를 이용하여 keycloak 실행 환경을 구축하는 포스팅 모음 (docker compose 포함)   황제낙엽 2024.01.22 408
10 KeyCloak 을 활용하여 사용자 인증을 처리하는 과정에 대한 포스팅 모음   황제낙엽 2024.01.20 101
9 [POST/2020.11.10] KeyCloak의 REST API 이용해서 JWT 발급과 검증 file https://oingdaddy.tistory.com/198  황제낙엽 2024.01.20 281
8 SAML roles 에 대하여   황제낙엽 2024.01.20 101
7 무료 Authorization Server 솔루션   황제낙엽 2024.01.18 154
6 Keycloak 에 대하여   황제낙엽 2024.01.18 133
» OAuth2 구글(Google), Github, 카카오(Kakao), 네이버(Naver) 로그인 API 목록 https://choiseokwon.tistory.com/389  황제낙엽 2023.12.17 135
4 Spring Authorization Server 관련 포스트 목록과 인프런 강의   황제낙엽 2023.12.07 111
3 [POST/2023.05.22] OAuth 2.1 Authorization Server (Spring Security) 구축 후기 file https://tech.kakaopay.com/post/spring-oa...-practice/  황제낙엽 2023.12.03 157
2 OAuth 와 JWT 내용 정리 (개념 정의 및 적용 전략) file https://seungwoolog.tistory.com/95  황제낙엽 2023.12.03 171
1 [Copilot, Bard] oauth claim 의 의미   황제낙엽 2023.12.02 113