ClinicKit Mobile SDK / Mobile flows

SSO Login Flow

This flow logs a user in with a Single Sign-On (SSO) token provided by VSee, using the loginBySSOToken function from the VSeeClinicCore framework (iOS). On Android, see SSO authentication in the Android Enter Waiting Room Flow.

Preconditions

  • VSee provides the SSO token. It is required for login.

Use case steps

  1. Initiate login with the SSO token: the app starts the login by calling loginBySSOToken with the SSO token from VSee.
    public func loginBySSOToken(_ token: String, success: @escaping() -> Void, failure: @escaping (Error) -> Void) {
        // Perform the login process with the provided SSO token.
    }

    Log in by SSO token
  2. User authentication: VSeeClinicCore uses the SSO token to authenticate the user with VSee's servers.
  3. Login success: if authentication succeeds, the success closure passed to loginBySSOToken runs, and the user is logged in.
    Login success
  4. Login failure: if authentication fails because the SSO token is invalid or expired, or for any other reason, the failure closure runs with an Error object, so the app can handle the failure gracefully.
    Login failure

Error handling

When login fails, inspect the Error object passed to the failure closure. It describes why login failed, so the app can show a suitable error message or recover.

Conclusion

Logging in with an SSO token through VSeeClinicCore lets your app integrate with VSee and give users a smooth login. The SSO token must come from VSee. Follow the steps above and handle errors, and users get a secure login through VSee's authentication.

Try the API calls interactively

The Member SSO use case walks through the same flow with live API calls.