Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auth] Await header value from underlying queue #13647

Merged
merged 4 commits into from
Sep 16, 2024
Merged
Changes from 1 commit
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
8 changes: 7 additions & 1 deletion FirebaseAuth/Sources/Swift/Backend/AuthBackend.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,13 @@ class AuthBackend: NSObject {
request.setValue(Bundle.main.bundleIdentifier, forHTTPHeaderField: "X-Ios-Bundle-Identifier")
request.setValue(requestConfiguration.appID, forHTTPHeaderField: "X-Firebase-GMPID")
if let heartbeatLogger = requestConfiguration.heartbeatLogger {
request.setValue(heartbeatLogger.headerValue(), forHTTPHeaderField: "X-Firebase-Client")
if let heartbeatLogger = requestConfiguration.heartbeatLogger {
ncooke3 marked this conversation as resolved.
Show resolved Hide resolved
let heartbeatsHeaderValue = await withUnsafeContinuation { continuation in
ncooke3 marked this conversation as resolved.
Show resolved Hide resolved
let heartbeatsHeader = heartbeatLogger.headerValue()
continuation.resume(returning: heartbeatsHeader)
}
request.setValue(heartbeatsHeaderValue, forHTTPHeaderField: "X-Firebase-Client")
}
}
request.httpMethod = requestConfiguration.httpMethod
let preferredLocalizations = Bundle.main.preferredLocalizations
Expand Down
Loading