Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] #14 - 소셜로그인 구현 #14

Merged
merged 20 commits into from
Jul 7, 2022

Conversation

yungu0010
Copy link
Member

@yungu0010 yungu0010 commented Jul 6, 2022

🔥 Pull requests

⛳️ 작업한 브랜치

👷 작업한 내용

  • 로그인뷰 UI 구현 (피그마 적용 안된 나만의 UI)
  • 애플 로그인 구현
  • 카카오 로그인 구현

🚨 참고 사항

📸 스크린샷

기능 스크린샷
UI 작업
카카오로그인 (앱)
카카오로그인 (웹) Simulator Screen Recording - iPhone 13 mini - 2022-07-06 at 21 51 39
애플로그인

📟 관련 이슈

@yungu0010 yungu0010 added Feat 새로운 기능 구현 🌈YunDol labels Jul 6, 2022
@yungu0010 yungu0010 self-assigned this Jul 6, 2022
@yungu0010 yungu0010 changed the title Feature/#4 [Feat] 소셜로그인 구현 Jul 6, 2022
Copy link
Member

@i-colours-u i-colours-u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 ^__^

static let kakaoLoginError = "카카오 로그인에 실패하였습니다."
static let appleLoginError = "애플 로그인에 실패하였습니다."
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5;
구조체 간에 한 줄 간격으로만 작성해주면 좋을것 같아요 ~!

Comment on lines 18 to 21
lazy var titleImageView = UIImageView()
lazy var subtitleImageView = UIImageView()
lazy var kakaoLoginButton = UIButton()
lazy var appleLoginButton = UIButton()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p3;

Social LoginVC에서만 사용하는 UI요소이기 때문에 - private 형태로 선언해주세요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네~~!

Comment on lines 108 to 116
func showKakaoLoginFailMessage() {
self.makeAlert(title: I18N.Alert.error, message: I18N.Auth.kakaoLoginError, okAction: nil, completion: nil)
}

func postSocialLoginData(socialToken: String, socialType: String) {

}

func appleLogin() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p3;
여기서도 private 으로 접근제한자 처리하면 좋을것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private을 기억하자. 확인❗️

Copy link
Member

@L-j-h-c L-j-h-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

캬아아 소셜로그인 구현한다고 고생많으셨어~~! 최고의 와비선배... 샌드위치 맛있어?
코베 도약도 좋았다!!

@@ -6,31 +6,39 @@
//

import UIKit
import KakaoSDKAuth
Copy link
Member

@L-j-h-c L-j-h-c Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5;

한 칸 띄우기티비 ㅋㅋ

struct Auth {
static let kakaoLoginError = "카카오 로그인에 실패하였습니다."
static let appleLoginError = "애플 로그인에 실패하였습니다."
}
Copy link
Member

@L-j-h-c L-j-h-c Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5;

저도 안쓰고 있었는데 반성하겠습니다..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

나 잘했어?

import UIKit

import SnapKit
import AuthenticationServices
Copy link
Member

@L-j-h-c L-j-h-c Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5;

처음이니까 초큼 깐깐하게 할게여... 알파벳 순서대로! ㅎㅎ

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오케이!!

Comment on lines 31 to 70
private func setUI() {
titleImageView.image = UIImage(named: "authTitle")
subtitleImageView.image = UIImage(named: "authSubtitle")

kakaoLoginButton.setTitle("카카오톡 아이디로 로그인", for: .normal)
kakaoLoginButton.setTitleColor(.black, for: .normal)

appleLoginButton.setTitle("애플 아이디로 로그인", for: .normal)
appleLoginButton.backgroundColor = UIColor.carrotBlack
}

private func setLayout() {
view.addSubviews(titleImageView, subtitleImageView, kakaoLoginButton, appleLoginButton)
titleImageView.snp.makeConstraints { make in
make.top.equalToSuperview().inset(270)
make.centerX.equalToSuperview()
}

subtitleImageView.snp.makeConstraints { make in
make.top.equalTo(titleImageView.snp.bottom).offset(15)
make.centerX.equalToSuperview()
}

kakaoLoginButton.snp.makeConstraints { make in
make.top.equalTo(subtitleImageView.snp.bottom).offset(100)
make.leading.trailing.equalToSuperview().inset(50)
make.centerX.equalToSuperview()
}

appleLoginButton.snp.makeConstraints {make in
make.top.equalTo(kakaoLoginButton.snp.bottom).offset(9)
make.leading.trailing.equalToSuperview().inset(50)
make.centerX.equalToSuperview()
}
}

func setAddTarget() {
kakaoLoginButton.addTarget(self, action: #selector(doKakaoLogin), for: .touchUpInside)
appleLoginButton.addTarget(self, action: #selector(doAppleLogin), for: .touchUpInside)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p4;

요 친구들 extension 해서 바깥으로 빼주세요~~!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네~~!

Comment on lines +42 to +65
private func setLayout() {
view.addSubviews(titleImageView, subtitleImageView, kakaoLoginButton, appleLoginButton)
titleImageView.snp.makeConstraints { make in
make.top.equalToSuperview().inset(270)
make.centerX.equalToSuperview()
}

subtitleImageView.snp.makeConstraints { make in
make.top.equalTo(titleImageView.snp.bottom).offset(15)
make.centerX.equalToSuperview()
}

kakaoLoginButton.snp.makeConstraints { make in
make.top.equalTo(subtitleImageView.snp.bottom).offset(100)
make.leading.trailing.equalToSuperview().inset(50)
make.centerX.equalToSuperview()
}

appleLoginButton.snp.makeConstraints {make in
make.top.equalTo(kakaoLoginButton.snp.bottom).offset(9)
make.leading.trailing.equalToSuperview().inset(50)
make.centerX.equalToSuperview()
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5;

코베 고생하셨어라~~
너무잘했고

appleLogin()
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5;

이쯤에서 마크구문도 넣어주셔라!!!!!!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵!!

Copy link
Member

@L-j-h-c L-j-h-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영 잘해주셨네요!! 고생하셨구 hamburger bar도 가보자~~

@yungu0010 yungu0010 merged commit 20e77d8 into Health-Food-Me:develop Jul 7, 2022
@yungu0010 yungu0010 changed the title [Feat] 소셜로그인 구현 [Feat] #14 - 소셜로그인 구현 Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 구현 🌈YunDol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 소셜 로그인 구현
4 participants