/// <summary> /// Reset the logged in user incase of user token expired errors from the server /// </summary> /// <param name="response">The api response.</param> /// <returns></returns> private static async Task HandleExpiredUserToken(ApiResponse response) { var isUserTokenExpired = IsUserTokenExpired(response); if (isUserTokenExpired == true) { await InternalApp.LogoutAsync(invalidateSessionOnServer : false); // Logout the user without invalidating the session on the server since the session is already expired. } }
/// <summary> /// Logout the currently logged in user. /// </summary> /// <returns></returns> public static async Task LogoutAsync() { await InternalApp.LogoutAsync(); }