[#191] 최초 로그인 시 자동으로 로그아웃 되는 현상을 해결한다#192
Conversation
opficdev
commented
Mar 5, 2026
- closed 소셜 로그인이 되고, 자동으로 로그아웃 되는 현상을 해결한다 #191
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 풀 리퀘스트는 UserDefaults에 저장된 'isFirstLaunch' 플래그가 removeAll() 메서드 호출 시 초기화되어 발생하는 자동 로그아웃 문제를 해결합니다. 이제 'isFirstLaunch' 상태가 올바르게 유지되어 사용자가 한 번 로그인하면 세션이 지속됩니다. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
|
||
| func removeAll() { | ||
| guard let bundleIdentifier = Bundle.main.bundleIdentifier else { return } | ||
| let firstLaunch = userDefaults.object(forKey: "isFirstLaunch") |
| if let firstLaunch { | ||
| userDefaults.set(firstLaunch, forKey: "isFirstLaunch") | ||
| } |
There was a problem hiding this comment.
현재 firstLaunch 객체의 타입을 확인하지 않고 다시 저장하고 있습니다. FetchFirstLaunchUseCase 등을 고려할 때 이 값은 Bool 타입이어야 할 것으로 보입니다. 타입 안정성을 높이기 위해 Bool 타입으로 캐스팅하여 저장하는 것이 안전합니다.
| if let firstLaunch { | |
| userDefaults.set(firstLaunch, forKey: "isFirstLaunch") | |
| } | |
| if let isFirstLaunch = firstLaunch as? Bool { | |
| userDefaults.set(isFirstLaunch, forKey: "isFirstLaunch") | |
| } |