release: 1.7.0 - #29
Merged
Merged
Conversation
웹뷰가 앱의 @access_token 을 읽을 수 없어 POST /auth/student 로 자기만의 studentId 를 따로 발급했다. 백엔드는 Feedback.studentId -> StudentUser 로 푸시 대상을 찾는데 웹뷰 신원에는 StudentUser 가 없어 답장 알림이 나가지 않았다. - injectedJavaScriptBeforeContentLoaded 로 window.__MOADONG_STUDENT_TOKEN__ 주입. 웹의 첫 API 호출 시점에 토큰이 있어야 하므로 onLoad 이후가 아닌 content load 이전에 주입한다. - 주입 스크립트는 웹뷰가 로드하는 모든 문서에서 실행되므로 origin 가드를 둔다. 없으면 외부 사이트 이동 시 베어러 토큰이 노출된다. - 토큰 조회가 끝난 뒤 웹뷰를 렌더한다. 발급 실패 시에는 주입 없이 렌더해 웹이 자체 토큰으로 폴백하도록 두고, 홈이 막히지 않게 한다. - ensureAccessToken 에 single-flight 가드 추가. 홈 웹뷰는 스플래시 아래에서 부트스트랩과 동시에 마운트되는데, 신규 설치처럼 저장된 토큰이 없으면 두 호출이 각각 sub 를 생성해 studentId 가 갈렸다. 그러면 FCM 등록 신원과 주입 신원이 달라져 주입 자체가 무의미해진다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
RN 의 URL 폴리필은 origin 을 정규식으로만 뽑아 호스트 대소문자와 기본 포트를 정규화하지 않는다. 반면 window.location.origin 은 정규화된 값이라 EXPO_PUBLIC_WEBVIEW_URL 이 https://MOADONG.com:443 같은 형태면 비교가 어긋나 토큰이 주입되지 않는다. 앱에서 origin 문자열을 만들어 넘기는 대신 BASE_URL 을 그대로 넘기고 웹뷰 안에서 브라우저의 URL 구현으로 비교한다. 양쪽 모두 정규화된 값이 된다. 파싱 실패 시에는 주입하지 않는다(fail closed). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
fix: 홈 웹뷰에 학생 토큰 주입해 우체통 답장 알림 대상 식별
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
SeongHoonC
marked this pull request as ready for review
August 15, 2026 10:44
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.
릴리즈 개요
1.7.017prod주요 변경사항
검증
npm run lint✅