From 5c2c647d13331e73fa4842c8b6ca1ccb75cc8f08 Mon Sep 17 00:00:00 2001 From: Borut Tomazin Date: Fri, 15 Nov 2024 14:51:27 +0100 Subject: [PATCH] Provide optional clientId. --- Sources/Google/GoogleAuthenticator.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/Google/GoogleAuthenticator.swift b/Sources/Google/GoogleAuthenticator.swift index e03cfd9..b454a28 100644 --- a/Sources/Google/GoogleAuthenticator.swift +++ b/Sources/Google/GoogleAuthenticator.swift @@ -25,6 +25,7 @@ extension GoogleAuthenticator: Authenticator { /// Will asynchronously return the `Response` object on success or `Error` on error. public func signIn( from presentingViewController: UIViewController, + clientId: String? = nil, hint: String? = .none, additionalScopes: [String]? = .none ) async throws -> Response { @@ -32,6 +33,9 @@ extension GoogleAuthenticator: Authenticator { return try await restorePreviousSignIn() } + // set clientId if provided (clientId is needed when doint auth via firebase) + clientId.map { provider.configuration = .init(clientID: $0) } + return try await signInUser( from: presentingViewController, hint: hint,