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] 소셜 로그인 토큰 UserDefault에 저장 및 기타 수정 (#203) #205

Conversation

lsj8706
Copy link
Contributor

@lsj8706 lsj8706 commented Jul 27, 2022

💥 관련 이슈

💥 구현/변경 사항 및 이유

  • jwt 토큰을 UserDefault에 저장
  • 자동 로그인 구현
  • 로그인 플로우 수정
  • 캐릭터 변경 기능 추가 (설정 뷰에서)
  • 게시글 삭제 후 하루 해픽 뷰로 돌아가도록 수정
  • 해픽 레포트의 API 호출 시점 viewWillAppear로 수정

💥 PR Point

  • pull 받고 시뮬에서 앱 삭제했다가 다시 실행해보실래요? 이미 회원가입을 한 카카오 계정이라면 회원가입 대신 로그인 뷰가 보여야합니다.

💥 참고 사항

Simulator Screen Recording - iPhone 13 mini - 2022-07-27 at 15 47 51

@lsj8706 lsj8706 added 세진✨ 멋쟁이 리드 📬 API 서버 API 통신 🔨 Refactor 리팩토링 수빈✨ 아무것도 모르는 응애 📌 Auth 로그인, 회원가입 뷰 💡Feature 기능 구현 labels Jul 27, 2022
@lsj8706 lsj8706 requested review from devxsby and ZaidKang July 27, 2022 06:49
@lsj8706 lsj8706 added this to In progress in happic: via automation Jul 27, 2022
Copy link
Contributor

@devxsby devxsby left a comment

Choose a reason for hiding this comment

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

역시 MVP...

@@ -7,9 +7,14 @@

import UIKit

Copy link
Contributor

Choose a reason for hiding this comment

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

// MARK: - Protocols


import Foundation

@propertyWrapper struct UserDefaultWrapper<T> {
Copy link
Contributor

Choose a reason for hiding this comment

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

👍🏻

@@ -139,6 +138,16 @@ final class HomeController: BaseUploadViewController {
// checkPostStatus()
setActionSheet()
}

func checkLogin() {
if !userManager.hasJwtToken {
Copy link
Contributor

Choose a reason for hiding this comment

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

클린코드를 지킵시다..~~
not 구문 사용 지양

Copy link
Contributor Author

Choose a reason for hiding this comment

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

클린코드 잘 공부했네요 👍

Copy link
Contributor

@devxsby devxsby left a comment

Choose a reason for hiding this comment

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

그만잘해

Comment on lines 135 to 139
let createCharacterView = CreateCharacterViewController.instantiate()
createCharacterView.isSignUp = false
let nav = UINavigationController(rootViewController: createCharacterView)
nav.modalPresentationStyle = .fullScreen
present(nav, animated: true)
Copy link
Contributor

Choose a reason for hiding this comment

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

instantiate 야무지게 잘 쓰셨네요 굳
그리고 nav는 뭐죠?? 약어 안쓰기로 했잖아요 ..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

걸렸네 😅

@@ -7,9 +7,14 @@

import UIKit

protocol CustomPopUpControllerDelegate: AnyObject {
func popUpDidDismiss()
Copy link
Contributor

Choose a reason for hiding this comment

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

얘 이름 뭔가 이상한데? ㅋㅋ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

넘어가줘

Comment on lines 18 to 19
if newValue == nil { UserDefaults.standard.removeObject(forKey: key) }
else { UserDefaults.standard.setValue(newValue, forKey: key) }
Copy link
Contributor

Choose a reason for hiding this comment

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

이거 린트 안걸렸나여?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

와 귀신 같이 잡네..
인간 린트세요?

@@ -32,7 +36,10 @@ class CharacterNameViewController: UIViewController {

namingCharacterLabel.attributedText = attributedStr

self.dismiss(animated: true)
guard let pvc = self.presentingViewController else { return }
Copy link
Contributor

Choose a reason for hiding this comment

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

p..v..c..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

수정하겠습니다!

self.dismiss(animated: true)
guard let pvc = self.presentingViewController else { return }
self.dismiss(animated: true) {
pvc.dismiss(animated: true)
Copy link
Contributor

Choose a reason for hiding this comment

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

To Do: 인디케이터바 추가하기

Copy link
Contributor Author

Choose a reason for hiding this comment

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

인디케이터바는 수빈님이 할래요?

Copy link
Contributor

Choose a reason for hiding this comment

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

ㅇㅇ..

@@ -180,6 +180,7 @@ final class HaruHappicDetailController: UIViewController {

@objc private func showAlertPopUp() {
let alartPopUpView = CustomPopUpController()
alartPopUpView.delegate = self
Copy link
Contributor

Choose a reason for hiding this comment

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

setDelegate함수에 빼는거랑 showAlertPopUp함수에 넣는거랑 어떤게 맞을지 궁금함 (그냥 궁금)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

alertPopUpView 가 showAlertPopUp 함수 내부에서 선언되어 있어서 setDelegate에서는 접근이 불가능해요 그래서 여기서 밖에 delegate 지정을 못해줍니당

Copy link
Contributor

Choose a reason for hiding this comment

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

아하 넵!

@TeamHappic TeamHappic deleted a comment from lsj8706 Jul 27, 2022
@TeamHappic TeamHappic deleted a comment from lsj8706 Jul 27, 2022
@lsj8706 lsj8706 merged commit 6acfae2 into TeamHappic:develop Jul 27, 2022
happic: automation moved this from In progress to Done Jul 27, 2022
@lsj8706 lsj8706 deleted the feat/#203-소셜-로그인-토큰-UserDefault에-저장 branch July 27, 2022 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
세진✨ 멋쟁이 리드 수빈✨ 아무것도 모르는 응애 📬 API 서버 API 통신 📌 Auth 로그인, 회원가입 뷰 💡Feature 기능 구현 🔨 Refactor 리팩토링
Projects
Development

Successfully merging this pull request may close these issues.

[Feat] 소셜 로그인 토큰 UserDefault에 저장 및 사용
2 participants