Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions DevLog/Infra/Service/SocialLogin/GoogleAuthenticationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,17 @@ final class GoogleAuthenticationService: AuthenticationService {
}

func unlink(_ uid: String) async throws {
logger.info("Starting Google disconnect for unlink. uid: \(uid)")
GIDSignIn.sharedInstance.signOut()
try await GIDSignIn.sharedInstance.disconnect()
do {
logger.info("Starting Google disconnect for unlink. uid: \(uid)")
GIDSignIn.sharedInstance.signOut()
try await GIDSignIn.sharedInstance.disconnect()

logger.info("Starting Firebase Google provider unlink. uid: \(uid)")
_ = try await user?.unlink(fromProvider: AuthProviderID.google.rawValue)
logger.info("Starting Firebase Google provider unlink. uid: \(uid)")
_ = try await user?.unlink(fromProvider: AuthProviderID.google.rawValue)
} catch {
logger.error("Failed to unlink Google account", error: error)
throw error
}
}

}