darthdaron
darthdaron

Reputation: 11

Logout in UWP with Mobile Apps backend

I am trying to learn to develop UWP apps. I followed this tutorial and everything was working fine. But currently it is throwing Unauthorized access error, although it is saying that the credentials are loaded. So I was wondering if it is possible to logout the user and clear the cached token?

I tried to use this code but it is not working:

 private async void ButtonLogout_Click(object sender, RoutedEventArgs e)

        {
            ButtonLogin.Visibility = Visibility.Visible;
            ButtonSave.Visibility = Visibility.Collapsed;

        await App.MobileService.LogoutAsync();

        }

Any idea how to do it?

Upvotes: 1

Views: 224

Answers (1)

Kasam Shaikh
Kasam Shaikh

Reputation: 318

Microsoft Azure recently released SDK updates that includes changes in the authentication flow.

Have you already updated to the latest NuGet packages for both the client and server SDKs? If not, try to update it & then check, it should Work!

Regards, Kasam

Upvotes: 1

Related Questions