1

我使用 xamarin Essentials WebAuthenticator 进行社交媒体登录。使用登录表单打开浏览器后,用户按下浏览器上的取消按钮,它会给我“Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=1”错误。我怎样才能选择取消而没有任何错误?

 try
        {
            var authResult = await WebAuthenticator.AuthenticateAsync(
                             new Uri(App.AuthServer + "/mobileauth/Facebook"),
                             new Uri("MyApp://"));

            var accessToken = authResult?.AccessToken;
        }
        catch (Exception ex)
        {
        }

在此处输入图像描述

4

0 回答 0