Back to Uno

Authentication

doc/articles/getting-started/wizard/includes/authentication.md

6.6-release-branch-cut2.3 KB
Original Source

Adds Uno Platform's Custom Authentication support to the generated project.

Using Uno's authentication tools you can easily integrate in your app a login screen and authenticate users. It also helps you manage and track the state of the app's authentication, by allowing you to log out or switch users as well as other authentication-related actions.

Uno.Extensions.Authentication currently supports these types of authentication:

  • None

    No authentication is added to the application. This is the default for both blank and recommended presets.

    dotnetcli
    dotnet new unoapp -auth none
    
  • Custom

    Provides a customized login experience for performing login, refresh, or logout. This is also the authentication type that is generated with the project template when Custom Authentication is selected. The other types are not supported yet at the moment but they're on the roadmap and will come to the wizard soon.

    dotnetcli
    dotnet new unoapp -auth custom
    
  • MSAL

    MSAL (formerly AzureAD) stands for Microsoft Authentication Library, is part of the Microsoft Identity Platform and enables acquiring authentication tokens and access of protected APIs using OAuth2 and OpenID.

    dotnetcli
    dotnet new unoapp -auth msal
    
  • OIDC

    Also referred to as OpenID Connect, is a simple identity layer using the OAuth 2.0 protocol.

    dotnetcli
    dotnet new unoapp -auth oidc
    
  • Web

    Web authentication is achieved via a web page that the app sends over to be opened in the browser and gets a token result once the login process is completed successfully.

    dotnetcli
    dotnet new unoapp -auth web
    

Read the Authentication documentation to get more knowledge about Uno Platform's authentication support and the tools it provides.

[!NOTE] The Authentication option is selected by default in the Default template, and not in the Blank one. This option is dependent on the DependencyInjection option and is only shown if the latter is enabled.