

SFAuthenticationSession, ASWebAuthenticationSession)에 메모리 누수가 발생 var kakaoAuthSession: ASWebAuthenticationSession?
...
/// 카카오 로그인
func logInKakao() async throws -> Supabase.Session? {
let redirectURL = Bundle.main.redirectURL
do {
let session = try await client.auth.signInWithOAuth(
provider: Provider.kakao,
redirectTo: redirectURL
) { [weak self] session in
guard let self else { return }
self.kakaoAuthSession = session
session.presentationContextProvider = self
session.prefersEphemeralWebBrowserSession = true
}
kakaoAuthSession = nil
return session
} catch {
kakaoAuthSession?.cancel()
kakaoAuthSession = nil
NSLog("error: \(error.localizedDescription)")
throw AuthError.logInFailed(.kakao, error)
}
}kakaoAuthSession = session : 나중에 취소하거나 상태를 추적하기 위해 인스턴스 프로퍼티에 저장presentationContextProvider : 로그인 화면(웹뷰)을 어느 뷰 컨트롤러 위에 띄울지 결정하는 델리게이트
