-
Notifications
You must be signed in to change notification settings - Fork 5
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
[FIX] #253 - 카카오톡 로그인 post 서버 통신 시, oauthToken을 사용하도록 변경 #254
Conversation
if let token = oauthToken?.accessToken { | ||
self.postUserSignUpWithAPI(request: token) | ||
UserDefaults.standard.set(false, forKey: Const.UserDefaultsKey.isAppleLogin) | ||
UserDefaults.standard.set(true, forKey: Const.UserDefaultsKey.isKakaoLogin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loginWithApp 메서드에서도 token 을 다루어야 할거 같아요! 그리고 userDefaults 에 저장해주세요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗 감사합니다 급해서 ^__^
userDefaults
에는 통신하고 토큰값이랑 일괄적으로 아이디도 담고있습니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗! 넵 수고했어요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다시금 보다가 생각나서 남겨용!~
UserApi.shared.me {(_, error) in | ||
if let error = error { | ||
print(error) | ||
} else { | ||
if let email = user?.kakaoAccount?.email { | ||
self.postUserSignUpWithAPI(request: email) | ||
if let token = oauthToken?.accessToken { | ||
self.postUserSignUpWithAPI(request: token) | ||
UserDefaults.standard.set(false, forKey: Const.UserDefaultsKey.isAppleLogin) | ||
UserDefaults.standard.set(true, forKey: Const.UserDefaultsKey.isKakaoLogin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mini-min 지금 뒤늦게 또 보고있는데 UserAPI.shared.me 는 사용자 정보를 가져오는거라서 우리는 굳이 안가져오니까 이 코드는 사용하지 않아도 될거 같아요....!
하지만 있어도 문제없는 코드니까 민재도 알고 넘어가면 될거 같네요!
if let token = oauthToken?.accessToken { | ||
self.postUserSignUpWithAPI(request: token) | ||
UserDefaults.standard.set(false, forKey: Const.UserDefaultsKey.isAppleLogin) | ||
UserDefaults.standard.set(true, forKey: Const.UserDefaultsKey.isKakaoLogin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
앗! 넵 수고했어요!
🌴 PR 요약
🌱 작업한 브랜치
🌱 작업한 내용
email
사용 ->oauthToken?.accessToken
사용으로 변경📮 관련 이슈