-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from THEGOODs-repo/feature/36
✨ Feat: 소셜 로그인 구현(카카오, 네이버)(#36)
- Loading branch information
Showing
10 changed files
with
322 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
import org.springframework.mail.javamail.MimeMessageHelper; | ||
import org.springframework.stereotype.Component; | ||
|
||
import javax.mail.internet.InternetAddress; | ||
import javax.mail.internet.MimeMessage; | ||
|
||
@Component | ||
|
@@ -15,11 +16,11 @@ public class MailConfig { | |
public boolean sendMail(String ToEmail, String code) { | ||
try { | ||
MimeMessage message = javaMailSender.createMimeMessage(); | ||
message.setFrom(new InternetAddress("[email protected]", "TheGoods", "UTF-8")); | ||
MimeMessageHelper helper = new MimeMessageHelper(message, true, "UTF-8"); | ||
|
||
helper.setSubject("TheGoods 인증번호 "); // 제목 | ||
helper.setTo(ToEmail); // 받는사람 | ||
helper.setFrom("[email protected]"); | ||
|
||
String verificationCode = code; | ||
String emailBody = String.format("TheGoods 인증번호는 %s입니다.", verificationCode); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/com/umc/TheGoods/web/dto/member/KakaoProfile.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.umc.TheGoods.web.dto.member; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class KakaoProfile { | ||
|
||
public Long id; | ||
public String connected_at; | ||
public KakaoAccount kakao_account; | ||
|
||
@Data | ||
public class KakaoAccount { | ||
|
||
public Boolean has_email; | ||
public Boolean email_needs_agreement; | ||
public Boolean is_email_valid; | ||
public Boolean is_email_verified; | ||
public String email; | ||
public Boolean has_phone_number; | ||
public Boolean phone_number_needs_agreement; | ||
public String phone_number; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.