SSO login


This document describes the use case of logging in a user using a Single Sign-On (SSO) token provided by VSee. The process involves using the loginBySSOToken function from the VSeeClinicCore framework.


  • The SSO Token is provided by VSee and is a required parameter for the login process.

Use Case Steps

  1. Initiate Login with SSO Token: The application initiates the login process by calling the loginBySSOToken function and passing the SSO token obtained from VSee.

public func loginBySSOToken(_ token: String, success: @escaping() -> Void, failure: @escaping (Error) -> Void) { // Perform the login process with the provided SSO token. }


  1. User Authentication: The VSeeClinicCore framework uses the provided SSO token to authenticate the user with VSee's servers.

  2. Login Success: If the user authentication is successful, the success closure provided to the loginBySSOToken function is executed, indicating that the user is logged in.


  1. Login Failure: If the user authentication fails due to an invalid or expired SSO token or any other reason, the failure closure provided to the loginBySSOToken function is executed with an associated Error object, allowing the application to handle the failure gracefully.

Error Handling

In case of a login failure, the application can handle the error appropriately by inspecting the Error object provided in the failure closure. The error contains relevant information about the reason for the failure, allowing the application to display appropriate error messages to the user or perform any required error recovery.


The use case of logging in via SSO token with VSeeClinicCore allows applications to seamlessly integrate with VSee's services and provide a smooth user experience for logging in with the SSO token. As a precondition, the SSO Token must be provided by VSee to ensure a successful login process. By following the provided steps and handling errors effectively, the application can take advantage of VSee's authentication mechanism and provide a secure login experience for users.