Azure 移动应用程序身份验证 - 身份验证响应的格式无效

Azure Mobile Apps authentication - invalid format of the authentication response

我正在使用 Azure 移动应用程序,并且我已经使用 Microsoft 帐户和 Facebook 帐户设置了我的凭据。

https://studybuddy.azure-mobile.net/.auth/login/microsoftaccount/callback https://studybuddy.azure-mobile.net/.auth/login/facebook/callback

^^ 我相信这不是 return 的象征。 "User" 从未设置,因为我应该从登录中取回的 "token" 不存在。

相关代码:

private async System.Threading.Tasks.Task<bool> AuthenticateAsync()
    {

        string message;
        bool success = false;
        try
        {
            // Change 'MobileService' to the name of your MobileServiceClient instance.
            // Sign-in using Facebook authentication.
            user = await App.MobileService
                .LoginAsync(MobileServiceAuthenticationProvider.Facebook);



            message =
                string.Format("You are now signed in - {0}", user.UserId);

            success = true;
        }
        catch (InvalidOperationException e)
        {
            message = "You must log in. Login Required";
        }

        var dialog = new MessageDialog(message);
        dialog.Commands.Add(new UICommand("OK"));
        await dialog.ShowAsync();
        return success;
    }

问题是我的项目已从 Azure 的旧移动服务方式迁移到 Azure 的新移动应用程序。

解决方案是使用 Azure 移动服务的旧代码或将项目升级到 Azure 移动应用程序。