Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion FirebaseAuth/Sources/Swift/Backend/IdentityToolkitRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ private let kHttpProtocol = "http:"

private let kEmulatorHostAndPrefixFormat = "%@/%@"

private var gAPIHost = "www.googleapis.com"
#if compiler(>=6)
/// Host for server API calls. This should be changed via
/// `IdentityToolkitRequest.setHost(_ host:)` for testing purposes only.
private nonisolated(unsafe) var gAPIHost = "www.googleapis.com"
#else
/// Host for server API calls. This should be changed via
/// `IdentityToolkitRequest.setHost(_ host:)` for testing purposes only.
private var gAPIHost = "www.googleapis.com"
#endif // compiler(>=6)

private let kFirebaseAuthAPIHost = "www.googleapis.com"
private let kIdentityPlatformAPIHost = "identitytoolkit.googleapis.com"
Expand Down
11 changes: 9 additions & 2 deletions FirebaseAuth/Sources/Swift/Backend/RPC/SecureTokenRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,15 @@ private let kRefreshTokenKey = "refreshToken"
/// The key for the "code" parameter in the request.
private let kCodeKey = "code"

/// Host for server API calls.
private var gAPIHost = "securetoken.googleapis.com"
#if compiler(>=6)
/// Host for server API calls. This should be changed via
/// `SecureTokenRequest.setHost(_ host:)` for testing purposes only.
private nonisolated(unsafe) var gAPIHost = "securetoken.googleapis.com"
#else
/// Host for server API calls. This should be changed via
/// `SecureTokenRequest.setHost(_ host:)` for testing purposes only.
private var gAPIHost = "securetoken.googleapis.com"
#endif // compiler(>=6)

/// Represents the parameters for the token endpoint.
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
Expand Down
Loading