File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
src/main/java/com/ongi/backend/domain/auth Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,9 @@ public CommonResponse<LoginResponse> refreshAccessToken(HttpServletRequest httpS
5555 private void setRefreshTokenCookie (HttpServletResponse response , String refreshToken ) {
5656 Cookie cookie = new Cookie ("refresh_token" , refreshToken );
5757 cookie .setHttpOnly (true );
58- cookie .setSecure (true );
58+ cookie .setSecure (false );
5959 cookie .setPath ("/" );
60+ cookie .setAttribute ("SameSite" , "None" );
6061 cookie .setMaxAge ((int ) (REFRESH_TOKEN_EXPIRATION / 1000 ));
6162 response .addCookie (cookie );
6263 }
Original file line number Diff line number Diff line change 1212import com .ongi .backend .domain .caregiver .service .CaregiverService ;
1313import com .ongi .backend .domain .centerstaff .entity .CenterStaff ;
1414import com .ongi .backend .domain .centerstaff .service .CenterStaffService ;
15- import io .jsonwebtoken .Claims ;
1615import jakarta .transaction .Transactional ;
1716import lombok .RequiredArgsConstructor ;
1817import org .springframework .security .core .Authentication ;
1918import org .springframework .security .core .context .SecurityContextHolder ;
2019import org .springframework .security .crypto .password .PasswordEncoder ;
2120import org .springframework .stereotype .Service ;
2221
23- import java .util .HashMap ;
2422import java .util .Map ;
2523
2624@ Service
@@ -37,7 +35,7 @@ public class AuthService {
3735 public LoginTokensDto login (LoginRequest request ) {
3836 if (request .authority ().equals (Authority .ROLE_CAREGIVER .toString ())) {
3937 return caregiverLogin (request );
40- } else if (request .authority ().equals (Authority . ROLE_CENTER_MANAGER . toString ()) || request . authority (). equals ( Authority . ROLE_SOCIAL_WORKER . toString () )) {
38+ } else if (request .authority ().equals ("ROLE_CENTER" )) {
4139 return centerStaffLogin (request );
4240 } else {
4341 throw new ApplicationException (AuthErrorCase .INVALID_AUTHORITY );
You can’t perform that action at this time.
0 commit comments