Conversation
|
@tteokgook1 제가 열심히 보고 있는데 코드 읽는 속도가 느려서 새벽까지 해서 한꺼번에 리뷰 올리겠습니다! |
아직 완성이 안 된 거긴 해요 |
아 그럼 천천히 해보겠습니다 ㅋㅋㅋㅋ |
hyun-1210
left a comment
There was a problem hiding this comment.
일단 수정하고 계시다 해서 조금 리뷰 한것만 먼저 올립니다!
src/main/kotlin/com/wafflestudio/team2server/user/JwtProvider.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/service/UserService.kt
Outdated
Show resolved
Hide resolved
|
Auth, User test 잘 통과되나요?? |
There was a problem hiding this comment.
Pull request overview
This PR implements a comprehensive user authentication system with both local (username/password) and Google OAuth2 login capabilities. The implementation uses JWT tokens stored in HTTP-only cookies for session management and provides complete user CRUD operations.
Key Changes:
- JWT-based authentication with cookie storage for secure session management
- Local registration and login with BCrypt password hashing
- Google OAuth2 integration with automatic user creation
- User profile management endpoints (view, update password, delete account)
Reviewed changes
Copilot reviewed 35 out of 37 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
| build.gradle.kts | Added Spring Security, OAuth2, JWT, and Jackson Kotlin dependencies |
| src/main/resources/application.yml | Migrated from .properties to .yml, added JWT and OAuth2 configuration |
| src/main/resources/application-{local,prod}.yml | Added profile-specific frontend URL configuration |
| src/main/kotlin/.../user/model/User.kt | Created User entity with support for both local and OAuth authentication |
| src/main/kotlin/.../user/repository/UserRepository.kt | Added repository with queries for both localId and oauthId |
| src/main/kotlin/.../user/service/UserService.kt | Implemented local registration, login, password update, and account deletion |
| src/main/kotlin/.../user/service/GoogleOAuth2UserService.kt | OAuth2 service for Google login with automatic user creation |
| src/main/kotlin/.../user/controller/AuthController.kt | Auth endpoints for registration, login, and logout |
| src/main/kotlin/.../user/controller/UserController.kt | User management endpoints for profile operations |
| src/main/kotlin/.../user/JwtProvider.kt | JWT token generation, validation, and cookie management |
| src/main/kotlin/.../user/JwtAuthenticationFilter.kt | Filter to extract and validate JWT from cookies |
| src/main/kotlin/.../user/UserArgumentResolver.kt | Resolver to inject authenticated User into controller methods |
| src/main/kotlin/.../user/OAuth2SuccessHandler.kt | Success handler for OAuth2 flow to create JWT cookie |
| src/main/kotlin/.../user/UserException.kt | Exception hierarchy for user-related errors |
| src/main/kotlin/.../config/SecurityConfig.kt | Spring Security configuration with OAuth2 and BCrypt setup |
| src/main/kotlin/.../config/WebConfig.kt | CORS and custom argument resolver configuration |
| src/main/kotlin/.../config/JacksonConfig.kt | Jackson ObjectMapper configuration with Kotlin support |
| src/main/kotlin/.../DomainException.kt | Base exception class for domain errors |
| src/main/kotlin/.../GlobalControllerExceptionHandler.kt | Global exception handler for DomainException |
| src/test/resources/application-test.yml | Migrated test configuration to YAML with Testcontainers setup |
| src/test/kotlin/.../helper/DataGenerator.kt | Test helper for generating users with tokens |
| src/test/kotlin/.../AuthTests.kt | Comprehensive tests for registration, login, and logout |
| src/test/kotlin/.../UserTests.kt | Tests for user profile, password update, and account deletion |
| src/test/kotlin/.../CrawlerTests.kt | Updated to use SpringBootTest with full application context |
| .github/workflows/cd.yml | Added JWT secret generation and OAuth environment variables |
| Dockerfile | Added prod profile activation |
| README.md | Added documentation for environment setup and OAuth flow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/kotlin/com/wafflestudio/team2server/user/OAuth2SuccessHandler.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/controller/AuthController.kt
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/service/UserService.kt
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/service/UserService.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/UserArgumentResolver.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/controller/UserController.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 35 out of 37 changed files in this pull request and generated 20 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/kotlin/com/wafflestudio/team2server/user/service/GoogleOAuth2UserService.kt
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/controller/AuthController.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/controller/AuthController.kt
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/dto/LocalRegisterRequest.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/service/UserService.kt
Show resolved
Hide resolved
src/main/kotlin/com/wafflestudio/team2server/user/dto/LocalRegisterRequest.kt
Outdated
Show resolved
Hide resolved
|
@tteokgook1 I've opened a new pull request, #8, to work on those changes. Once the pull request is ready, I'll request review from you. |

이 PR이 어떤 기능을 추가했나요?
주의해야 할 점이나 유의사항이 있나요?
/oauth2/authorization/google로 GET 요청을 보내면 구글 로그인 화면으로 넘어갑니다.