-
Notifications
You must be signed in to change notification settings - Fork 0
AuthAPIService와 구글 로그인을 추가합니다. #7
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces Google login functionality by adding API models and service interfaces for authentication. The changes establish the foundation for authentication features by implementing the necessary network infrastructure and configuration.
- Adds Google login API service with request/response models
- Sets up network module with dependency injection using Dagger Hilt
- Configures build flavors and server configuration for different environments
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| AuthApiService.kt | Defines Retrofit interface for Google login API endpoint |
| LoginResponse.kt | Response model for login API with success/error handling |
| GoogleLoginRequest.kt | Request model containing ID token and device information |
| OkHttpClientQualifier.kt | Qualifier annotations for dependency injection |
| ServiceModule.kt | Dagger module providing AuthApiService instance |
| NetworkModule.kt | Main network configuration with OkHttp and Retrofit setup |
| ServerConfig.kt | Interface for server configuration abstraction |
| AndroidApplicationConventionPlugin.kt | Adds build flavors with server URL configuration |
| AppModule.kt | App-level Dagger module binding ServerConfig implementation |
| ServerConfigImpl.kt | Implementation of ServerConfig using BuildConfig |
| AndroidManifest.xml | Adds Internet permission and cleartext traffic configuration |
| build.gradle.kts | Updates dependencies for networking and serialization |
| @Serializable | ||
| data class LoginResponse( | ||
| val success: Boolean, | ||
| val data: LoginData, |
Copilot
AI
Jul 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data field should be nullable since authentication can fail and the API might not return login data in error cases.
| val data: LoginData, | |
| val data: LoginData?, |
| data class LoginResponse( | ||
| val success: Boolean, | ||
| val data: LoginData, | ||
| val meta: Meta |
Copilot
AI
Jul 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The meta field should be nullable since error information might not always be present in successful responses.
| val meta: Meta | |
| val meta: Meta? |
| @POST("/api/v1/auth/login/google") | ||
| suspend fun googleLogin( | ||
| @Body googleLoginRequest: GoogleLoginRequest | ||
| ): LoginResponse |
Copilot
AI
Jul 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function should return Response<LoginResponse> or handle error responses properly, as network calls can fail and the current implementation doesn't account for HTTP error status codes.
| ): LoginResponse | |
| ): Response<LoginResponse> |
| connectTimeout(timeout = 10, unit = TimeUnit.SECONDS) | ||
| writeTimeout(timeout = 15, unit = TimeUnit.SECONDS) | ||
| }.addInterceptor(httpLoggingInterceptor) | ||
| .build() |
Copilot
AI
Jul 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation: this line should align with the previous method calls in the builder chain.
| .build() | |
| .build() |
| android:label="@string/app_name" | ||
| android:roundIcon="@mipmap/ic_launcher_round" | ||
| android:supportsRtl="true" | ||
| android:usesCleartextTraffic="true" |
Copilot
AI
Jul 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabling cleartext traffic can expose sensitive data. Consider using HTTPS only or implementing a network security config that restricts cleartext traffic to development environments.
| android:usesCleartextTraffic="true" | |
작업