Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: billilge/stream-server/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
#️⃣연관된 이슈
feat/#86-kconnect-client([Feat/#83] OAuth 로그인 auth 도메인과 계정 연결 구성 #88·[Feat/#84] 로그인용 회원 가입·갱신·약관 동의 조회·학적 상태 추가 #89·#91이 머지된 뒤 머지)🎯 해결하려는 문제가 무엇인가요?
POST /v1/auth/login/{provider}로그인 API를 추가합니다. 앱·웹이{ code, codeVerifier, redirectUri }를 보내면 서비스 JWT와 약관 동의 필요 여부를 내려줍니다.{ "accessToken": "…", "termsAgreementRequired": true }❓ 왜 해결해야 하나요?
지금까지 PR로 만든 auth 도메인·member·KConnect 구현체를 하나의 로그인 흐름으로 조립해야 실제로 로그인할 수 있습니다.
⭐ 어떻게 해결했나요?
AppAuthController·AppAuthApi(app-api): 경로는/v1/app/**밖인/v1/auth/login/{provider}. 학생 앱과 운영진 콘솔이 같이 쓰고, 접근 범위는 토큰의 role로 나뉩니다.PublicEndpoints.AUTH로 permitAll·Swagger 공개 표기를 함께 맞췄습니다.@NotBlank,codeVerifier는 PKCE 규격(43~128자,A-Z a-z 0-9 - . _ ~)OAuthLoginUseCase:authenticate→ 연결된 계정으로 회원 찾기 → 있으면 프로필 갱신, 없으면 학번 기준 가입·갱신 후 계정 연결 → 토큰 발급 → 약관 동의 여부AuthTokenIssuer(gateway:auth의security최상위 패키지):JwtProvider는 Modulith가 내부로 보는security.jwt에 있어 api가 직접 부를 수 없어 파사드를 뒀습니다. ADMIN 회원에게는{ADMIN, STUDENT}를 주고(운영진도 학생 앱 사용), 학생회 부서는 ADMIN에게만 싣습니다.config-and-auth.md의 공개 경로 예시를 실제 경로로 갱신🧩 이 PR의 한계 & 트레이드오프
⛓️ 기존 기능에 미치는 영향
/v1/auth/login/*app-api가core:domain:auth·core:domain:member에 의존합니다.JwtAuthFilter는 공개 경로라도 만료된Authorization헤더가 붙으면 401을 냅니다. 앱·웹은 로그인 요청에 토큰 헤더를 붙이지 않아야 합니다.🔀 Edge Case & 실패 시나리오
INVALID_INPUTUNSUPPORTED_OAUTH_PROVIDERREDIRECT_URI_NOT_ALLOWEDINVALID_AUTHORIZATION_CODEDEPARTMENT_NOT_ALLOWEDOAUTH_PROVIDER_UNAVAILABLEinvalid_client, 설정 누락)📋 검토한 대안과 선택 이유
@Transactional: provider 호출 동안 커넥션을 점유해 제외했습니다.TransactionTemplate: 컨벤션에 없는 새 패턴이라 보류하고, 학번 조회로 복구하는 방식을 택했습니다./v1/app/auth/...: 운영진 콘솔도 같은 로그인을 써서 공용 경로로 뒀습니다.💬 리뷰 포인트
/v1/auth/login/*)