Error

[missing_user_info_uri] Missing required UserInfo Uri in UserInfoEndpoint for Client Registration

2023. 3. 16. 23:22

네이버 로그인 기능을 구현하다가 

이 같은 에러가 발생했다.

 

 

application-oauth.properties

# registration
spring.security.oauth2.client.registration.naver.client-id=클라이언트ID
spring.security.oauth2.client.registration.naver.client-secret=클라이언트Secret
spring.security.oauth2.client.registration.naver.redirect-uri={baseUrl}/{action}/oauth2/code/{registrationId}
spring.security.oauth2.client.registration.naver.authorization-grant-type=authorization_code
spring.security.oauth2.client.registration.naver.scope=name,email,profile_image
spring.security.oauth2.client.registration.naver.client-name=Naver

# Provider
spring.security.oauth2.client.provider.naver.authorization-uri=https://nid.naver.com/oauth2.0/authorize
spring.security.oauth2.client.provider.naver.token-uri=https://nid.naver.com/oauth2.0/token
spring.security.oauth2.client.provider.naver.user-name-attribute=response

user_info_uri가 없어서 필요하다는 것이었다.

 

https://developers.naver.com/docs/login/devguide/devguide.md#3-4-5-%EC%A0%91%EA%B7%BC-%ED%86%A0%ED%81%B0%EC%9D%84-%EC%9D%B4%EC%9A%A9%ED%95%98%EC%97%AC-%ED%94%84%EB%A1%9C%ED%95%84-api-%ED%98%B8%EC%B6%9C%ED%95%98%EA%B8%B0

 

네이버 로그인 개발가이드 - LOGIN

네이버 로그인 개발가이드 1. 개요 4,200만 네이버 회원을 여러분의 사용자로! 네이버 회원이라면, 여러분의 사이트를 간편하게 이용할 수 있습니다. 전 국민 모두가 가지고 있는 네이버 아이디

developers.naver.com

 

코드를 보니 user-info-uri를 설정하는 코드가 없었다. 그래서 아래 코드를 추가했다.

spring.security.oauth2.client.provider.nave.user-info-uri=https://openapi.naver.com/v1/nid/me

하지만 그런데도 여전히 같은 문제가 발생했다. 다른 원인이 있는 줄 알고 열심히 찾아봤지만 별다른 소득이 없었다. 그래서 다시 네이버 로그인 기능을 구현하는 클래스들과 설정파일을 살펴봤다.

 

그러다가 위 코드를 자세히 보니 naver로 입력해야 하는데 nave로 되어 있는 것을 발견했다. nave에 r을 추가해서 naver로 바꾸니 해결되었다.

spring.security.oauth2.client.provider.naver.user-info-uri=https://openapi.naver.com/v1/nid/me

 

'Error' 카테고리의 다른 글

status":415,"error":"Unsupported Media Type  (0) 2023.03.31
org.springframework.beans.factory.UnsatisfiedDependencyException  (0) 2023.03.28
org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests  (0) 2023.03.14
java.sql.SQLException: No database selected  (0) 2023.03.10
[에러] Uncaught ReferenceError: $ is not defined  (0) 2022.12.04
'Error' 카테고리의 다른 글
  • status":415,"error":"Unsupported Media Type
  • org.springframework.beans.factory.UnsatisfiedDependencyException
  • org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
  • java.sql.SQLException: No database selected
ewok
ewok
ewok
기록장
ewok
전체
오늘
어제
  • 분류 전체보기
    • 웹개발 교육
      • HTML
      • CSS
      • JavaScript
      • Database
      • Java
      • jQuery
      • Ajax
      • Bootstrap
      • jsp
      • Spring
      • MyBatis
      • 프로젝트
    • JAVA
    • SpringBoot
      • 기초
      • AWS
      • 개인프로젝트
    • Spring Security
    • JPA
    • 테스트코드
    • Error
    • CS
      • 컴퓨터 구조
      • 이산수학
    • 알고리즘
      • 정리
      • Java
    • SQL
    • 자격증
      • SQLD
      • 정보처리기사
    • Git

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • SQLD
  • 생성자
  • this
  • 브랜치
  • git bash
  • branch
  • sqld 자격증
  • org.springframework.beans.factory.UnsatisfiedDependencyException
  • 노랭이
  • base
  • org.hibernate.tool.schema.spi.CommandAcceptanceException
  • merge commit
  • GIT
  • 버전 관리
  • sqld 합격

최근 댓글

최근 글

hELLO · Designed By 정상우.
ewok
[missing_user_info_uri] Missing required UserInfo Uri in UserInfoEndpoint for Client Registration
상단으로

티스토리툴바

단축키

내 블로그

내 블로그 - 관리자 홈 전환
Q
Q
새 글 쓰기
W
W

블로그 게시글

글 수정 (권한 있는 경우)
E
E
댓글 영역으로 이동
C
C

모든 영역

이 페이지의 URL 복사
S
S
맨 위로 이동
T
T
티스토리 홈 이동
H
H
단축키 안내
Shift + /
⇧ + /

* 단축키는 한글/영문 대소문자로 이용 가능하며, 티스토리 기본 도메인에서만 동작합니다.