BT

Facilitating the spread of knowledge and innovation in professional software development

Contribute

Topics

Choose your language

InfoQ Homepage News Xamarin.Essentials 1.7 with New Web Authenticator Options and .NET MAUI Essentials

Xamarin.Essentials 1.7 with New Web Authenticator Options and .NET MAUI Essentials

This item in japanese

Bookmarks

Xamarin.Essentials represent the critical library that enables developers to create apps that work seamlessly across various mobile platforms, providing an easy way to access the native APIs and consume them inside of the app. Based on the numbers, it has become one of the most widely used libraries in the .NET development environment.

Xamarin.Essentials 1.7 release is focused on critical bug fixes and enhancements to the Web Authenticator API. The WebAuthenticator is a part of Xamarin.Essentials and an SDK that enables developers to add authentication to their apps through their own ASP.NET Core server backend.

 

Along with the bug fixes for Web Authenticator, new private authentication options were added for the launch of the authentication session as private. This approach enables developers to request that no shared cookies or browsing data are available between authentication sessions; instead, it will be a fresh login session for each time it is requested.

WebAuthenticatorOptions is now available within Xamarin.Essentials 1.7 to set it up for iOS mobile apps. The usage of it is available in the following code example:

var url = new Uri("https://mysite.com/mobileauth/Microsoft");
var callbackUrl = new Uri("myapp://")
var authResult = await WebAuthenticator.AuthenticateAsync(new WebAuthenticatorOptions
    {
        Url = url,
        CallbackUrl = callbackUrl,
        PrefersEphemeralWebBrowserSession = true
    });


Another big thing that was introduced is the port of Xamarin.Essentials into .NET MAUI and future development of it. .NET MAUI Essentials at this moment is a part of the .NET MAUI GitHub repository with active development from Microsoft and the open-source community.

To enable usage of .NET MAUI Essentials inside of the .NET MAUI app, code snippet <UseMaui>true</UseMaui> needs to be located inside of the .csproj file and all of the APIs are available when using Microsoft.Maui.Essentials; the namespace is added to the code file.

We know that there are developers today that will be updating their existing Xamarin.iOS and Xamarin.Android apps to .NET 6 without .NET MAUI and still want to leverage all of the APIs in Xamarin.Essentials. We have you covered as well as you can add <UsingMauiEssentials>true</UsingMauiEssentials> to your .NET 6 iOS and Android apps to bring in all of the latest APIs.

James Montemagno, principal lead program manager, .NET Community

 

To follow the project development progress and next releases of .NET MAUI, the official roadmap is available on the GitHub wiki roadmap.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • I do not care about Xamarin or Maui.

    by Michael Barb,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Xamarin users have already been Silverlighted. I expect the same for Maui. When it is put in the main stream of .NET with a number then I will care. I know they are both headed that way but by the time they get there they will have changed so much one will will barely recognize what they are today.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT