Skip to content

Commit 48a0d76

Browse files
committed
BrowserSignin.Options docs and platform availability
1 parent de5e460 commit 48a0d76

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Sources/BrowserSignin/BrowserSignin.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,15 @@ public final class BrowserSignin {
6565
public typealias WindowAnchor = Void
6666
#endif
6767

68+
/// Defines the options used to control the behavior of the browser and its presentation.
6869
public struct Option: Sendable, OptionSet {
6970
public let rawValue: Int
7071
public init(rawValue: Int) { self.rawValue = rawValue }
71-
72+
73+
#if canImport(AuthenticationServices)
74+
/// Requests that the browser utilizes an ephemeral session, which does not persist cookies or other browser storage between launches.
7275
public static let ephemeralSession = Option(rawValue: 1 << 0)
76+
#endif
7377
}
7478

7579
/// Active / default shared instance of the ``BrowserSignin`` session.
@@ -102,6 +106,7 @@ public final class BrowserSignin {
102106
/// Used to control the options which dictates the presentation and behavior of the sign in session.
103107
public var options: Option = []
104108

109+
#if canImport(AuthenticationServices)
105110
/// Indicates whether or not the developer prefers an ephemeral browser session, or if the user's browser state should be shared with the system browser.
106111
public var ephemeralSession: Bool {
107112
get {
@@ -111,6 +116,7 @@ public final class BrowserSignin {
111116
options.insert(.ephemeralSession)
112117
}
113118
}
119+
#endif
114120

115121
/// Starts sign-in using the configured client.
116122
/// - Parameters:

0 commit comments

Comments
 (0)