Skip to content

Conversation

@eshc123
Copy link
Member

@eshc123 eshc123 commented Jul 23, 2025

작업

  • Google 로그인용 API 모델 및 서비스 인터페이스 정의

@eshc123 eshc123 requested review from Copilot and ny2060 July 23, 2025 09:49
@eshc123 eshc123 self-assigned this Jul 23, 2025
Copy link
Contributor

Copilot AI left a 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,
Copy link

Copilot AI Jul 23, 2025

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.

Suggested change
val data: LoginData,
val data: LoginData?,

Copilot uses AI. Check for mistakes.
data class LoginResponse(
val success: Boolean,
val data: LoginData,
val meta: Meta
Copy link

Copilot AI Jul 23, 2025

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.

Suggested change
val meta: Meta
val meta: Meta?

Copilot uses AI. Check for mistakes.
@POST("/api/v1/auth/login/google")
suspend fun googleLogin(
@Body googleLoginRequest: GoogleLoginRequest
): LoginResponse
Copy link

Copilot AI Jul 23, 2025

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.

Suggested change
): LoginResponse
): Response<LoginResponse>

Copilot uses AI. Check for mistakes.
connectTimeout(timeout = 10, unit = TimeUnit.SECONDS)
writeTimeout(timeout = 15, unit = TimeUnit.SECONDS)
}.addInterceptor(httpLoggingInterceptor)
.build()
Copy link

Copilot AI Jul 23, 2025

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.

Suggested change
.build()
.build()

Copilot uses AI. Check for mistakes.
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
Copy link

Copilot AI Jul 23, 2025

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.

Suggested change
android:usesCleartextTraffic="true"

Copilot uses AI. Check for mistakes.
@eshc123 eshc123 merged commit 477e160 into dev Jul 23, 2025
1 check passed
@eshc123 eshc123 deleted the feature/network-module branch July 23, 2025 10:01
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.

3 participants