public static void RemoveAuthorizationTokens(this ISyncLocalStorageService localStorage)
        {
            if (localStorage.HasAccessToken())
            {
                localStorage.RemoveItem(LocalStorageConstants.TokenType);
                localStorage.RemoveItem(LocalStorageConstants.AccessToken);
            }

            if (localStorage.HasRefreshToken())
            {
                localStorage.RemoveItem(LocalStorageConstants.RefreshToken);
            }
        }
        public async Task <bool> GetRefreshedToken()
        {
            if (localStorage.HasRefreshToken())
            {
                var refreshToken = localStorage.GetRefreshToken();

                var requestHeaders = RequestHeadersUtility.GetRequestHeaders(localStorage);

                var response = await userServiceClient.GetRefreshedTokenAsync(new GetRefreshedTokenRequest { RefreshToken = refreshToken }, requestHeaders);

                if (!response.IsError)
                {
                    localStorage.SetAuthorizationTokens(response.TokenType, response.AccessToken, response.RefreshToken);
                }
                else
                {
                    localStorage.RemoveAuthorizationTokens();
                }

                return(!response.IsError);
            }

            return(false);
        }