-
Notifications
You must be signed in to change notification settings - Fork 1
SCRUM-243 SCRUM-244 SCRUM-245 feature: kakao login and server login integration #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gdaegeun539
wants to merge
41
commits into
project-lyrics:develop
Choose a base branch
from
gdaegeun539:feature/SCRUM-243-SCRUM-244-SCRUM-245
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
SCRUM-243 SCRUM-244 SCRUM-245 feature: kakao login and server login integration #14
gdaegeun539
wants to merge
41
commits into
project-lyrics:develop
from
gdaegeun539:feature/SCRUM-243-SCRUM-244-SCRUM-245
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
- add kakao sdk repository, add login sdk - add kakao sdk r8 rules - add application class and sdk init code - set kakao api key loader - add login sdk redirection activity setting
- add login, logout, unlink
- own feelin server jwt token model - common oauth token model - to unify support kakao, google oauth token
Add androidx.datastore.preferences library to enable secure token storage with Flow-based reactive data access. - Add datastore version 1.1.1 to libs.versions.toml - Add datastore-preferences dependency to app module
Add fromString() companion method to convert stored string values back to OAuthProvider enum for DataStore retrieval. - Support case-insensitive string matching - Return null for invalid provider names
Implement DataStore-based local data source to persist authentication tokens and OAuth information. Storage strategy: - Backend JWT tokens (access, refresh, userId) - OAuth provider and tokens - Flow-based reactive data access - Singleton pattern for app-wide consistency Multi-module ready: Can be moved to :core:data module
Implement singleton manager to handle authentication state and token management across the entire app lifecycle. Responsibilities: - Memory caching via StateFlow for reactive UI - Delegate persistence to AuthLocalDataSource - Synchronize in-memory state with storage - Manage both Backend JWT and OAuth tokens Features: - Auto-load tokens on app start - Reactive login state (isLoggedIn) - OAuth provider tracking - Token update and clear operations Multi-module ready: Can be moved to :core:data module
Implement OkHttp interceptor to automatically attach JWT access token to all API requests. Features: - Read token from AuthManager StateFlow - Add Authorization: Bearer header - Skip if no token available - Singleton pattern for OkHttp client Includes TokenAuthenticator stub for future 401 handling and automatic token refresh implementation. Multi-module ready: Can be moved to :core:network module
Update AuthRepository to use AuthManager for centralized token management and reactive login state. Changes: - Remove EncryptedSharedPreferences dependency - Integrate AuthManager for token persistence - Expose isLoggedIn and userId as StateFlow - Store OAuth provider and tokens on login - Clear all tokens on logout via AuthManager - Update AuthToken model to use Long userId Backend API compatibility: - Match response structure with userId as Long - Temporary dummy token until backend integration TODO: Implement actual backend API calls for login/logout
Configure Hilt DI module for authentication components to ensure singleton instances across the app. Provides: - AuthLocalDataSource @singleton - AuthManager @singleton Dependencies are automatically injected via constructor injection pattern following Hilt best practices. Multi-module ready: Can be moved to :core:data module
- serializer to kotlinx.serialization
- include DeviceId Header
- remove duplicate provides to prevent CyclicDependency - AuthDataLocalSource - AuthManager - add annotation auth sdk source to prevent MissingBinding - KakaoAuthDataSource - GoogleAuthDataSource
- 카카오 로그인 SDK와 Jetpack Credentials에서 activity가 필요한 부분을 View에서 직접 연동하도록 합니다.
Member
Author
|
서버 터져서 결과값도 못 보는데 서버 다시 열릴때까지 드래프트 상태로 둘게요 |
Member
Author
|
서버 이관이 완료됐다 하셔서 PR을 다시 열게요. |
1 task
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.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior (if this is a feature change)?
LoginScreen에 격리해 구현합니다.Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Yes
'What is the new behavior' 섹션에 서술된 것 처럼 라이브러리 추가 및 초기 설정이 많습니다.
Hilt를 사용하기 위한 기본 설정 및 스코프를 설정합니다.
SCRUM-243 init: kakao login sdk set #12 과 같이 레포지토리와 DataSource는
@Singleton스코프를 유지합니다.몇 개의 함수가 detekt의 반환 개수 기준을 통과하지 못해 CI가 실패하는데, 이 기준은 한 번 논의했으면 합니다.
Other information:
PR 양이 많은데, 양해 부탁드립니다. 억지로 작업량을 줄인 #12 처럼 일부분만을 올리는 것 보다 완전히 작동하는 코드를 올리는 게 맞다고 보아, 외부 SDK 설정-HTTP 통신-코드 연동을 위한 Hilt 설정을 모두 진행한 PR로 다시 올립니다.
지금은 소셜 토큰으로 로그인을 진행할 때 우리 서버에 계정이 없어 02000 에러를 받는 상황까지만 구현됐고, 이후 사항은 회원가입 온보딩에 연동해야 해요.
혹시 예외처리를 완전히 진행하는 걸 원하시거나, 다이얼로그까지 띄우는 것을 원하신다면 말씀해 주세요. 이 PR에 기능이 이미 많아서 통합하는 건 어려울 거 같은데, 진행을 원하시면 다른 티켓을 끊어서 작업할게요.