This repository contains a basic .NET MAUI application integrated with Auth0 authentication.
Check out the article Add Authentication to .NET MAUI Apps with Auth0 for the implementation details.
Clone the repo with the following command:
git clone https://github.com/auth0-blog/dotnet-maui-auth0-app.git
Move to the dotnet-maui-auth0-app
folder.
Open the MauiProgram.cs
file and replace the <YOUR_AUTH0_DOMAIN>
and <YOUR_CLIENT_ID>
placeholders with your Auth0 domain and client id respectively (see Register with Auth0 for more details).
Run the application with Visual Studio 2022 or use one of the following commands based on your target platform:
# macOS target platform
dotnet build -t:Run -f net8.0-maccatalyst
# Android target platform
dotnet build -t:Run -f net8.0-android
# iOS target platform
dotnet build -t:Run -f net8.0-ios
# Windows target platform (⚠️ Currently not working! ⚠️)
dotnet build -t:Run -f net8.0-windows10.0.19041.0 -p:WindowsPackageType=None