Skip to content

Commit

Permalink
Provide optional clientId.
Browse files Browse the repository at this point in the history
  • Loading branch information
borut-t committed Nov 15, 2024
1 parent 948802e commit 5c2c647
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Google/GoogleAuthenticator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ 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 {
guard !provider.hasPreviousSignIn() else {
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,
Expand Down

0 comments on commit 5c2c647

Please sign in to comment.