getCurrentSwid
MaestroKit provides the getCurrentSwid function to retrieve the ID of the currently authenticated user. This asynchronous function returns an optional String containing the user ID if the user is authenticated, or nil if no user is currently authenticated.
| Return Type | Description | Example | 
|---|---|---|
| String? | The ID of the currently authenticated user; nilif not available. | "user12345" | 
Code Example
Task {
    if let swid = await MaestroManager.shared.getCurrentSwid() {
        print("Current Swid: \(swid)")
    } else {
        print("No authenticated swid found.")
    }
}