Skip to content

Commit

Permalink
Merge branch 'feat/#27/google-v2' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
itsme-shawn committed Jan 30, 2024
2 parents 1d4446a + f1fc6ec commit 38cd450
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class JwtTokenProvider implements InitializingBean {

private Key key;

private final Long accessTokenExpiredTime = 1000 * 60L * 60L * 12L; // 유효시간 12시간 (임시 변경)
private final Long accessTokenExpiredTime = 1000 * 60L * 60L * 24L; // 유효시간 24시간 (임시 변경)
private final Long refreshTokenExpiredTime = 1000 * 60L * 60L * 24L * 14L; // 유효시간 14일

private final Long shortAccessTokenExpiredTime = 1000 * 60L * 5; // 유효시간 5분
Expand All @@ -37,7 +37,7 @@ public void afterPropertiesSet() throws Exception {
}

public String createAccessToken(Map<String, String> payload) {
return createJwtToken(payload, shortAccessTokenExpiredTime);
return createJwtToken(payload, accessTokenExpiredTime);
}

public String createRefreshToken(Map<String, String> payload) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ public LoginResponseDto login(String code) {
String refreshToken = jwtTokenProvider.createRefreshToken(payload);

// redis에 저장
RefreshToken refreshTokenEntity = new RefreshToken();
refreshTokenEntity.setUserId(member.getId());
refreshTokenEntity.setRefreshToken(refreshToken);

refreshTokenRepository.save(refreshTokenEntity);
// RefreshToken refreshTokenEntity = new RefreshToken();
// refreshTokenEntity.setUserId(member.getId());
// refreshTokenEntity.setRefreshToken(refreshToken);
//
// refreshTokenRepository.save(refreshTokenEntity);

return LoginResponseDto.builder()
.accessToken(accessToken)
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ spring:
client-secret: ${CLIENT_SECRET}
redirectUri: ${GOOGLE_REDIRECT_URL_LOCAL} # 나중에 수정
scope: profile, email
front-redirection-url: ${FRONT_LOCAL_REDIRECTION_URL}

---
spring:
Expand Down

0 comments on commit 38cd450

Please sign in to comment.