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

[team-03][Elly&Zeke] Octokit과 AuthenticationServices을 이용한 로그인 기능 #12

Closed
wants to merge 13 commits into from

Conversation

zekexros
Copy link
Member

@zekexros zekexros commented Apr 22, 2021

작업내용

  • 깃허브 로그인 버튼 생성
  • SPM 메뉴로 Octokit(GitHub 주소(https://github.com/nerdishbynature/octokit.swift))를 넣고 패키지 추가
  • GitHub OAuth Application 추가하기
  • Client ID와 Client Secret을 사용하여 OAuthConfiguration을 생성하고 authenicate 메소드를 통해 URL 생성
  • 앞서 생성한 URL을 통해 ASWebAuthenticationSession을 초기화하고 completionHandler을 사용
  • Octokit에서 handleOpenURL() 메소드를 사용하여 Token을 받기 위해 다시 한번 요청을 보낸다.

고민했던 것

  • 토큰은 다른사람들에게 노출되면 안되는 중요한 정보라고 하여 암호화되는 장소인 키체인에 저장하려고 시도하였습니다. Octokit에서는 TokenConfiguration을 토큰처럼 사용한다고 생각하였습니다. 따라서 이 TokenConfiguration을 Data타입으로 인코딩을 하려했으나 Codable을 채택하거나 CustomType을 만들 수 없어 실패하였습니다.
  • TokenConfiguration의 accessToken 속성은 String타입으로 인코딩이 가능하므로 이것을 저장하고 사용하는것인가 하는 생각도 하였고, TokenConfiguration의 accessToken으로 깃허브의 Resource Server에 접속할 수 있는지는 잘 모르겠습니다. TokenConfiguration에는 refreshToken 속성은 왜 없는지 고민하였습니다.

부연설명

  • LoginViewController.swift만 피드백해주시면 됩니다!! 나머지 다른하나 ViewController는 좀 더 보충하여 PR보내겠습니다.

@ellyheetov ellyheetov added the review-iOS iOS 리뷰 label Apr 22, 2021
crongro pushed a commit that referenced this pull request Apr 22, 2021
@zekexros zekexros changed the title [iOS][Elly&Zeke] Octokit과 AuthenticationServices을 이용한 로그인 기능 [team-03][Elly&Zeke] Octokit과 AuthenticationServices을 이용한 로그인 기능 Apr 23, 2021
Copy link

@ChocOZerO ChocOZerO left a comment

Choose a reason for hiding this comment

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

스위프트의 클로저와 캡쳐링에 대해 꼭 공부해보시길 바랍니다.

let callbackUrlScheme = "codeissue"
let url = config.authenticate()?.appending([URLQueryItem(name: "redirect_uri", value: "codeissue://tracker")])

webAuthSession = ASWebAuthenticationSession.init(url: url!, callbackURLScheme: callbackUrlScheme, completionHandler: { (callBack:URL?, error:Error?) in

Choose a reason for hiding this comment

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

클로저를 사용할땐 캡쳐링이란 기능을 잘 알고 사용해야합니다.
weak, strong, unowned 키워드와 함께 관련 내용을 꼭 알고 넘어가세요.

@ChocOZerO
Copy link

Octokit 을 사용해보지 않아서 정확히 모르지만 대게 TokenConfiguration 라는 이름에 붙는 Configuration 은 보통 설정값이라고 생각하면 됩니다. 자체가 어떤 데이터가 되는건 아니고 특정 행위를 하도록 세팅하는거라고 생각하면 이해하기 쉬울거에요.

jjunyjjuny pushed a commit that referenced this pull request Apr 26, 2021
[0421] Complete Modal component
Malloc72P pushed a commit that referenced this pull request Apr 27, 2021
해당 섹션만 업데이트하도록 코드 변경
crongro pushed a commit that referenced this pull request Apr 27, 2021
* [#1] feat : create CRA

 - CRA를 설치했습니다

* [#1] feat : mediumCard index.jsx prop 추가

 - 상동

* [#1] feat : node-sass 추가

 - node sass를 추가했습니다

* [#1] feat : 폴더 구조 정리

 - atoms, molecules, images 등 파일 구조 수정했습니다

* [#5] feat : reset scss 추가

- reset scss 추가
- 기본 글꼴 추가

* [#5] feat : button, icon, tag components 추가

 - atoms의 button, icon, tag component를 재사용 가능한 형태로 생성했습니다.

* [#5] feat: set moculses structure

- LargeCard 구조설정
- MediumCard 구조 설정

* [#5] chore : 잘못 생성된 파일 수정

 - 파일 명을 sidedish -> frontend로 바꾸는 과정에서 폴더 구성이 꼬여서 수정

* [#5] feat: molcules- LargeCard,MediumCard 구조 생성

* [#13] feat : MainDish, More 컴포넌트 생성

 - 신규 컴포넌트 생성: maindish, more organisms

* [#11] feat: fetch를 위한 util dir 생성

- util/loadData 생성 : fetch로 data가져오기
- util/url 생성: 기본 url주소 변수 설정

* [#11] feat: HeaderLeft 생성

* [#13] feat : MediumCard TagType 추가

 - 메인요리에 medium카드를 사용하기 위해 medium카드 일부 속성을 수정했습니다.

* [#13] feat : useFetch 컴포넌트 추가

 - fetch기능을 분리하기 위해 util-useFetch컴포넌트를 생성

* [#11] feat: Header 생성

- HeaderLeft 구조 생성
- HeaderRight 구조 생성
- BestDish 구조 생성 중

* [#11] feat: useFatch fetch오류 해결

* [#12] feat: BestDish useTabs hook 사용

* [#13] feat : 카드 캐로셀 기능 완성

 - setTimeout으로 렌더링을 지연시켜 캐로셀 기능을 완성

* [#12] feat: BestDish UI 및 기능구성

- Tab 버튼 클릭시 rendering
- Header Style 일부 수정 (HeaderRight,HeaderLeft,Span,Icon)

* [#13] feat: CSS style 수정

- innerTitle 설정

* [#13] feat: MainDish,SideDish,BestDish CSS style디테일 설정

- mainDish의 <Icon>,<Image> margin 설정

* [#13] fix : tag 버튼 오류, carousel 렌더링 지연 방식 변경

 - tag 가 이벤트 특가만 나타나는 오류 수정
 - carousel 렌더링 지연 방식을 setTimeOut ->  onTransitionEnd 로 변경

Co-authored-by: ink-0 <71919983+ink-0@users.noreply.github.com>
ghis22130 pushed a commit that referenced this pull request Apr 29, 2021
BanchanCustomCell.xib 파일에 Cell Layout 작성

issue: #12
ghis22130 pushed a commit that referenced this pull request Apr 29, 2021
Cell Autolayout 수정

issue: #12
ghis22130 pushed a commit that referenced this pull request Apr 29, 2021
이미지를 가져와 앱에 뿌려지도록 구현

issue:#12
ghis22130 pushed a commit that referenced this pull request Apr 29, 2021
반찬 커스텀셀에 특가 배지 넣기위해 BadgeStaciView를 추가하였습니다.

issue: #12
wheejuni pushed a commit that referenced this pull request Apr 29, 2021
[BE] 로컬 테스트를 위해 MySQL5.7 도커화
wheejuni pushed a commit that referenced this pull request Apr 29, 2021
crongro pushed a commit that referenced this pull request May 3, 2021
* [#1] feat : create CRA

 - CRA를 설치했습니다

* [#1] feat : mediumCard index.jsx prop 추가

 - 상동

* [#1] feat : node-sass 추가

 - node sass를 추가했습니다

* [#1] feat : 폴더 구조 정리

 - atoms, molecules, images 등 파일 구조 수정했습니다

* [#5] feat : reset scss 추가

- reset scss 추가
- 기본 글꼴 추가

* [#5] feat : button, icon, tag components 추가

 - atoms의 button, icon, tag component를 재사용 가능한 형태로 생성했습니다.

* [#5] feat: set moculses structure

- LargeCard 구조설정
- MediumCard 구조 설정

* [#5] chore : 잘못 생성된 파일 수정

 - 파일 명을 sidedish -> frontend로 바꾸는 과정에서 폴더 구성이 꼬여서 수정

* [#5] feat: molcules- LargeCard,MediumCard 구조 생성

* [#13] feat : MainDish, More 컴포넌트 생성

 - 신규 컴포넌트 생성: maindish, more organisms

* [#11] feat: fetch를 위한 util dir 생성

- util/loadData 생성 : fetch로 data가져오기
- util/url 생성: 기본 url주소 변수 설정

* [#11] feat: HeaderLeft 생성

* [#13] feat : MediumCard TagType 추가

 - 메인요리에 medium카드를 사용하기 위해 medium카드 일부 속성을 수정했습니다.

* [#13] feat : useFetch 컴포넌트 추가

 - fetch기능을 분리하기 위해 util-useFetch컴포넌트를 생성

* [#11] feat: Header 생성

- HeaderLeft 구조 생성
- HeaderRight 구조 생성
- BestDish 구조 생성 중

* [#11] feat: useFatch fetch오류 해결

* [#12] feat: BestDish useTabs hook 사용

* [#13] feat : 카드 캐로셀 기능 완성

 - setTimeout으로 렌더링을 지연시켜 캐로셀 기능을 완성

* [#12] feat: BestDish UI 및 기능구성

- Tab 버튼 클릭시 rendering
- Header Style 일부 수정 (HeaderRight,HeaderLeft,Span,Icon)

* deploy : build 210423

* [#13] feat: CSS style 수정

- innerTitle 설정

* chore: add gitginore

* chore: Add basic gradlew files

* [#13] feat: MainDish,SideDish,BestDish CSS style디테일 설정

- mainDish의 <Icon>,<Image> margin 설정

* [#13] fix : tag 버튼 오류, carousel 렌더링 지연 방식 변경

 - tag 가 이벤트 특가만 나타나는 오류 수정
 - carousel 렌더링 지연 방식을 setTimeOut ->  onTransitionEnd 로 변경

* deploy : build 210424

* [#25] feat : Detail UI 컴포넌트 생성

 - Detail UI 를 위한 InfoGeneral, InfoImages, InfoNumber, InfoPrice, InfoProduct molecules 컴포넌트 생성

* [#24] feat: ADD tab click event(color change)

- Fix MediumCard Tag 부분

* [#25] fix : icon onClick 이벤트 실행 로직 수정

 - icon이 left, right 일 경우에만 moveSlide이벤트가 실행되도록 수정

* [#24] feat: ADD Img MouseOver event

- useState를 통한 isHover로 상태변경 가능

* [#24] feat: Fix CSS Detail in HoverEvent

* deploy : build 210427

* [#24] feat: ADD HeaderDrop event

- Header MouseOver 시 Drop event 추가
- Header DropMenu MouseOver 시 hover event 추가
- Private Component 이름 통일변경 (ex Div -> WrapDiv)
- Component들의 inex.style.jsx 추가 (Styled div 분리)

* [#25] fix : MainDish Carousel 스타일 적용 함수 분리

 - MainDish 스타일 및 매직넘버 삭제

* [#37] refactor : 코드리뷰 반영

 - useFatch 구조 변경 : loadData 컴포넌트 생성해서 데이터만 받아오고 useEffect는 각 컴포넌트에서 실행
 - tag 내용 및 컨텐츠 적용 방식 수정
 - span 스타일 컴포넌트 적용방식을 className 사용으로 변경

* [#25] feat : Detail UI 컴포넌트 수정

 - pages 컴포넌트 생성

* [#25] feat : Modal 컴포넌트 생성

- 모달 컴포넌트 생성 및 클릭 후 모달 오픈, close 버튼 클릭시 숨김 기능 구현

* [#25] feat: Modal data fetch 연결

* deploy : build 210428

* deploy : rebuild 210428

* deploy : rebuild 210428

* deploy : rebuild 210428

* build : rebuild 210428

* [#26] feat : 상세페이지 내 이미지 이벤트 추가

 - 이미지 및 썸네일 추가
 - 썸네일 클릭 시 메인 이미지 변경 이벤트 추가

* [#26] feat : large 카드에 모달 이벤트 추가

- large 카드에도 모달 이벤트를 추가했으나, 아직 베스트 반찬에는 데이터 api를 못받아오고 있으므로 실행은 되지 않게끔 주석처리 했습니다

* [#27] feat: Detail - Info UI 생성 및 fetch data 연결

* deploy :build 210429

* [#27] feat: Fix syntax error

* build : build 210429

* [#26] refactor : carousel 컴포넌트 생성

- 라이브러리화를 위해 carousel 컴포넌트 생성

* build : rebuild 210429

* build : rebuild 210429

* [#26] refactor : carousel 컴포넌트 완성

carousel, carousel style 컴포넌트를 mainDish 컴포넌트에서 분리 완료

* [#26] feat : OtherCard, DetailOther 컴포넌트 생성

 - 디테일 Carousel 작업을 위해 상기 컴포넌트 생성

* [#27] feat: Datail CSS UI 수정

- UI: BestMenu 오른쪽마진 수정
- UI: HoverCard 가운데 정렬  수정
- UI: Mouse cursor 디테일 설정
- feat: useTabs 삭제 및 component내부로 수정
- faet: getComma 파일생성 ( 원, (,) 넣는 함수)

* deploy : rebuild 210429

* deploy : build 210430

* [#27] FE API data fetch 연결 확인

* [#45] FE API data fetch 연결 확인

* [#26] feat : OtherCard 스타일 적용 완성

 - Other Card의 레이아웃 완성

* [#26] feat : OtherCard 케로셀 적용 중

* [#45] feat: 디테일한 CSS UI 구성

* [#26] feat : OtherCard 케로셀 완료

- portal을 적용해서 기존 캐러셀 컴포넌트를 재활용할 수 없는 관계로 캐로셀을 중복해서 사용함

* [#45] feat: fetch Data API and 합치기

* [#45]feat: Details 파일명 변경 및 데이터 전달

* [#45] feat:Details close error 해결

* [#45]feat: CSS style 수정

* [#45] feat: Image data 수정

* fix : Change directory name to camel case

Co-authored-by: ink-0 <71919983+ink-0@users.noreply.github.com>
Co-authored-by: woody <woojihye2339@gmail.com>
Co-authored-by: Tree <gmldbs1109@naver.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-31-44-162.ap-northeast-2.compute.internal>
@zekexros zekexros closed this May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-iOS iOS 리뷰
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants