Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/prod-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
-e JWT_ACCESS_TOKEN_VALIDITY="${{secrets.JWT_ACCESS_TOKEN_VALIDITY}}" \
-e JWT_REFRESH_TOKEN_VALIDITY="${{secrets.JWT_REFRESH_TOKEN_VALIDITY}}" \
-e FRONT_REDIRECT_DOMAIN="${{secrets.FRONT_REDIRECT_DOMAIN}}" \
-e FRONT_MAIN_DOMAIN="${{secrets.MAIN_DOMAIN}}" \
-e ELASTIC_HOST="${{secrets.PROD_ELASTIC_HOST}}" \
ghcr.io/${{ github.repository }}/zoopzoop:latest

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-server-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ jobs:
-e JWT_ACCESS_TOKEN_VALIDITY="${{secrets.JWT_ACCESS_TOKEN_VALIDITY}}" \
-e JWT_REFRESH_TOKEN_VALIDITY="${{secrets.JWT_REFRESH_TOKEN_VALIDITY}}" \
-e FRONT_REDIRECT_DOMAIN="${{secrets.TEST_REDIRECT_DOMAIN}}" \
-e FRONT_MAIN_DOMAIN="${{secrets.MAIN_DOMAIN}}" \
-e ELASTIC_HOST="${{secrets.TEST_ELASTIC_HOST}}" \
ghcr.io/${{ github.repository }}/zoopzoop:latest

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }}
NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }}
LIVEBLOCKS_SECRET_KEY: ${{ secrets.LIVEBLOCKS_SECRET_KEY }}
FRONT_MAIN_DOMAIN: ${{secrets.MAIN_DOMAIN}}
run: ./gradlew test --stacktrace

# 6. 테스트 결과 요약 출력
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public class OAuth2SuccessHandler extends SimpleUrlAuthenticationSuccessHandler
@Value("${front.redirect_domain}")
private String redirect_domain;

@Value("${front.main_domain}")
private String main_domain;

@Value("${spring.profiles.active:dev}")
private String activeProfile;

Expand Down Expand Up @@ -138,7 +141,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
.maxAge(jwtProperties.getAccessTokenValidity() / 1000)
// .domain() // 프론트엔드 & 백엔드 상위 도메인
// .secure(true) // https 필수 설정.
.domain(redirect_domain)
.domain(main_domain)
.secure(true)
.sameSite("None")
.build();
Expand All @@ -147,7 +150,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
.httpOnly(true)
.path("/")
.maxAge(jwtProperties.getRefreshTokenValidity() / 1000) // RefreshToken 유효기간과 동일하게
.domain(redirect_domain)
.domain(main_domain)
.secure(true)
.sameSite("None")
.build();
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,7 @@ naver:
client_secret: ${NAVER_CLIENT_SECRET}

liveblocks:
secret-key: ${LIVEBLOCKS_SECRET_KEY}
secret-key: ${LIVEBLOCKS_SECRET_KEY}

front:
main_domain: ${FRONT_MAIN_DOMAIN}