Skip to main content

getCurrentJwt

MaestroKit provides the getCurrentJwt function to retrieve the current authentication token used by the SDK. This asynchronous function returns an optional String that contains the JWT token if it has been configured; otherwise, it returns nil.

Return TypeDescriptionExample
String?The current authentication token (JWT) if available; nil if not configured."exampleJWTToken"

Code Example

Task {
if let authToken = await MaestroManager.shared.getCurrentJwt() {
print("Current Authentication Token: \(authToken)")
} else {
print("No authentication token configured.")
}
}