简体   繁体   中英

Authentication with Azure Mobile Services

I built a Universal App for windows 10. In my app I'm using Azure mobile services for authentication(Facebook, google, etc.).

// Define a member variable for storing the signed-in user. 
private MobileServiceUser user;

// Define a method that performs the authentication process
// using a Facebook sign-in. 
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)
    {
        message = "You must log in. Login Required";
    }

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

I have a problem with login window. In a low resolution I'm getting this window.

Login window in low resolution (screenshot).

however in a high resolution, I'm getting this window.

Login window in high resolution (screenshot).

How can I scale this is web page for different resolutions? Maybe I can get access to webview?

Thanks in advance.

据我所知,您无法访问Webview,因为它是操作系统级别,但是仍然可以访问大网页。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM