Skip to content

Conversation

@ProtossManse
Copy link
Collaborator

@ProtossManse ProtossManse commented Nov 20, 2025

🔗 관련 이슈

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 인증 토큰 검증 로직 개선
    • 토큰 갱신 프로세스 최적화로 인증 안정성 향상

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Walkthrough

인증 토큰 처리 로직이 수정되었습니다. AuthAuthenticator에서 토큰 새로고침 조건이 변경되었으며, AuthInterceptor에서 누락된 토큰에 대한 기본값이 빈 문자열로 설정되었습니다.

Changes

Cohort / File(s) Summary
Token Handling Updates
app/src/main/java/com/konkuk/medicarecall/data/network/AuthAuthenticator.kt, app/src/main/java/com/konkuk/medicarecall/data/network/AuthInterceptor.kt
AuthAuthenticator에서 토큰 파싱 로직 개선 (Bearer 접두사 처리 및 null 체크 조건 강화). AuthInterceptor에서 null 토큰에 대해 빈 문자열 기본값 적용.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant AuthInterceptor
    participant DataStore
    participant AuthAuthenticator
    participant API

    Client->>AuthInterceptor: Request
    AuthInterceptor->>DataStore: Get Access Token
    DataStore-->>AuthInterceptor: Token (or null)
    Note over AuthInterceptor: Elvis operator:<br/>token ?: ""
    AuthInterceptor->>AuthInterceptor: Create "Bearer " + token
    AuthInterceptor->>Client: Header (Authorization)
    
    alt Token needs refresh
        Client->>AuthAuthenticator: authenticate()
        AuthAuthenticator->>AuthAuthenticator: Extract old token<br/>removePrefix("Bearer")
        AuthAuthenticator->>AuthAuthenticator: Check: !isNullOrBlank()<br/>&& oldToken != newToken
        AuthAuthenticator->>API: Refresh token
        API-->>AuthAuthenticator: New token
        AuthAuthenticator-->>Client: Updated token
    else Token valid
        Client->>API: Request with token
        API-->>Client: Response
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • 두 개의 관련 파일에서 토큰 처리 로직 개선
  • 문자열 파싱 및 null 처리 로직 변경
  • 제어 흐름에는 미미한 영향

Poem

🔐 Bearer 토큰, 더 똑똑해졌네
빈 문자열로 안전하게 기본값 잡고
토큰 새로고침, 조건도 명확해졌네
인증 경로, 더욱 단단해졌어요 ✨


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between c81d53a and c598fce.

📒 Files selected for processing (2)
  • app/src/main/java/com/konkuk/medicarecall/data/network/AuthAuthenticator.kt (1 hunks)
  • app/src/main/java/com/konkuk/medicarecall/data/network/AuthInterceptor.kt (1 hunks)

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

@ProtossManse ProtossManse merged commit dc22aea into develop Nov 20, 2025
2 checks passed
@ProtossManse ProtossManse deleted the fix/too-many-request-refresh-#202 branch November 20, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] RefreshToken 무한 재발급 문제

2 participants