fix: Google OAuth 스코프에 필요한 권한 추가#24
Closed
Kimgyuilli wants to merge 1 commit into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
자동 생성된 에러 수정 PR
에러 정보
HttpError근본 원인
Google API 요청에 필요한 인증 범위(scopes)가 부족하여 발생하는 권한 오류.
AI 분석
에러 메시지에서 'Insufficient Permission'은 Google API에 필요한 인증 범위(scopes)가 부족하다는 것을 의미한다. 이는 Google OAuth와 관련된 문제로, 요청 시 필요한 권한이 누락되었기 때문에 발생한다. 사용한 OAuth 스코프들이 이 API 요청에 필요한 충분한 권한을 제공하지 않고 있기 때문이다. 현재 설정된 스코프에 Gmail API 접근 권한이 부족한 것으로 보인다.
Google API에서 메일 목록을 가져올 때 필요한 최소 권한은 'https://www.googleapis.com/auth/gmail.readonly'이다. 해당 권한을 제공하기 위해 OAuth 설정에서 누락된 권한이 필요한 것으로 판단된다.
수정 내용
Google OAuth 인증 스코프에 'https://www.googleapis.com/auth/gmail.readonly' 권한이 포함되어 있는지 확인하고 누락되었다면 추가.
수정된 파일
backend/app/auth/service.py변경 diff
backend/app/auth/service.py