# Authentication API URL: https://developers.vsee.com/guides/clinickit/react-native-authentication-api #### Login The `loginByUsername` method authenticates a user with a username and password. ```js await VSeeClinicKit.loginByUsername({ username, password }) ``` | Parameter | Type | Description | | --- | --- | --- | | `username` | `String` | The user's username. | | `password` | `String` | The user's password. | ##### Example usage ```js VSeeClinicKit.loginByUsername({ username, password }).then((response) => { if (response.success) { // Use async storage to store the token and restore it whenever you init VSeeClinicKit VSeeClinicKit.setUserToken(response.data.token); navigation.navigate(ScreenKeys.home); } }); ``` #### Guest login The `loginAsGuest` method logs a user in as a guest, using their first and last name. ```js await VSeeClinicKit.loginAsGuest({ first_name, last_name }) ``` | Parameter | Type | Description | | --- | --- | --- | | `first_name` | `String` | The guest's first name. | | `last_name` | `String` | The guest's last name. | #### Login by token (SSO) The `loginBySSOToken` method authenticates a user with a single sign-on (SSO) token. ```js await VSeeClinicKit.loginBySSOToken(token: string) ``` | Parameter | Type | Description | | --- | --- | --- | | `token` | `String` | The single sign-on token. | #### Logout The `logout` method logs out of the VSee Clinic session. ```js await VSeeClinicKit.logout() ```