Commit 1b81e4b
authored
[Feat] 웹뷰 자동 로그인 구현 (#195)
* Chore: turbo.json globalEnv 추가
* Feat: WebView 환경 감지하여 API URL 분기 처리
* Feat: postMessage 처리 추가하여 WebView 로그인/로그아웃 상태 동기화
* Feat: 개발용 WebView 설정 및 message handler 연결
* Feat: Webview 환경에서 페이지 전환 로직 분기 처리
* Chore: 줄바꿈 (prettier)
* Chore: @react-native-async-storage/async-storage install
* Chore: 의존성 업데이트트
* Feat: window.d.ts 추가
* Chore: 모바일 앱 개발을 위한 환경 변수 업데이트
* Refactor: messageHandler를 webviewLoginBridge로 이름 변경
* Feat: 웹뷰에서 자동로그인을 위한 토큰 전송 구현
* Feat: 웹뷰 자동로그인을 위한 웹 측 리스너 구현
* Feat: 웹에서 앱으로 로그인/로그아웃 메시지 전송 구현
* Feat: 웹뷰 환경에서 자동로그인을 위한 토큰 검증 로직 추가
* Chore: prettier 적용용
* Chore: 의존성 업데이트
* Refactor: window.d.ts -> global.d.ts로 변경
* Refactor: 로그인 API 로직 개선 및 토큰 검증 로직직 추가
* Refactor: useIsReactNativeWebview-> useWebview로 훅 이름 변경
* Chore: globalEnv 수정
* Chore: 의존성 업데이트
* Chore: global.d.ts platform 제거거
* Refactor: 웹뷰 이벤트 핸들러 로직 분리
* Refactor: 웹뷰 메시지 처리 로직 개선
* Refactor: 웹뷰 메세지 타입 상수화
* Remove: useWebview.ts 삭제
* Chore: globalEnv 설정 추가
* Chore: 파일명 대소문자 변경
* Chore: React import 구문 추가
* Refactor: getBaseUrl -> getNativeApiUrl로 변경
* Refactor: parseMessageEvent -> parseMessage로 변경
* Fix: token 유효성 검사 로직 제거
* Refactor: WebView API URL 체크 로직을 getWebApiUrl 유틸 함수로 분리
* Chore: 불필요한 className 제거
* Style: MembersSettingModal의 gap 간격 제거
* Refactor: WebView 메시지 핸들러에 accessToken 체크 로직 추가 및 불필요한 코드 제거
* Chore: AuthGuard에서 웹뷰 리다이렉트 로직 제거
* Feat: WebView 메시지에 따른 분기처리
* Chore: 의존성 업데이트트
* Chore: react-device-detect 라이브러리 제거
* Refactor: JSON.stringify를 stringifyJson 유틸함수로 대체
* Refactor: WebView 감지 로직 개선
* Refactor: react-device-detect 의존성 제거 후 내부 유틸함수로 대체
* Refactor: WebView 이벤트 핸들링 구조 개선
* Refactor: 프로젝트 전반적인 네이밍 Native -> WebView로 통일
* Refactor: AsyncStorage 핸들링 구조 개선
* Refactor: WebView 메시지 브릿지 구조 개선
* Chore: detectWebView.ts 삭제
* Refactor: 메시지 핸들러 파라미터 수정 및 불필요한 WebView 속성 제거
* Chore: import 문 줄바꿈
* Refactor: WebView 디바이스 감지 로직 간소화
* Refactor: WebView 디바이스 감지 로직을 별도 유틸리티로 분리하여 hook 간소화
* Refactor: WebView 메시지 브릿지를 이벤트 리스너로 변경
* Chore: sendMessageToWebView import 경로를 절대 경로로 변경
* Refactor: switch 문의 case 블록 스코프 처리
* Chore: import React 문 제거
* Chore: Merge branch 'develop' of https://github.com/codeit-internship-group-b/codeit-resources into 194-feat-rn-webview-브릿지-통신-구현
* Chore: ReactNativeWebView 객체 접근 방식을 옵셔널 체이닝으로 변경
* Fix: 불필요한 return 제거1 parent a3e078b commit 1b81e4b
39 files changed
Lines changed: 2193 additions & 1646 deletions
File tree
- apps
- mobile
- app/(route)
- constants
- hooks
- store
- utils
- web
- api
- app
- (admin)/members/_components/sidepanel
- _components
- _hooks
- constants
- settings/_components
- modals
- store
- utils
- components/SettingsModal
- lib
- bridge
- packages
- constants
- ui/src
- types
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | | - | |
| 11 | + | |
8 | 12 | | |
9 | | - | |
| 13 | + | |
10 | 14 | | |
| 15 | + | |
11 | 16 | | |
12 | | - | |
13 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
14 | 22 | | |
15 | 23 | | |
16 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
17 | 33 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | | - | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments