Skip to content

Commit

Permalink
[fix] CORS 관련(쿠키) 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
nimikgnoej committed Aug 31, 2023
1 parent 9178c12 commit d583f96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins("*")
.allowedMethods("*")
// .allowCredentials(true)
.allowCredentials(false)
.allowedOriginPatterns("*")
.exposedHeaders("Authorization")
.maxAge(3000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ private User saveUser(OAuthAttributes attributes) {
if (attributes.getOauth2UserInfo().getEmail() == null) {
createdUser.updateEmail(UUID.randomUUID()+"@social.com");
System.out.println("createdUser.getEmail() = " + createdUser.getEmail());
} else{
createdUser.updateEmail(attributes.getOauth2UserInfo().getEmail());
}

return userRepository.save(createdUser);
Expand Down

0 comments on commit d583f96

Please sign in to comment.