![]() |
VOOZH | about |
dotnet add package Auth0.OidcClient.MAUI --version 1.4.0
NuGet\Install-Package Auth0.OidcClient.MAUI -Version 1.4.0
<PackageReference Include="Auth0.OidcClient.MAUI" Version="1.4.0" />
<PackageVersion Include="Auth0.OidcClient.MAUI" Version="1.4.0" />Directory.Packages.props
<PackageReference Include="Auth0.OidcClient.MAUI" />Project file
paket add Auth0.OidcClient.MAUI --version 1.4.0
#r "nuget: Auth0.OidcClient.MAUI, 1.4.0"
#:package Auth0.OidcClient.MAUI@1.4.0
#addin nuget:?package=Auth0.OidcClient.MAUI&version=1.4.0Install as a Cake Addin
#tool nuget:?package=Auth0.OidcClient.MAUI&version=1.4.0Install as a Cake Tool
Integrate Auth0 in a MAUI application targetting iOS, macOS or Android by using the Auth0.OIdcClient.MAUI SDK.
The SDK can be installed through Nuget:
Install-Package Auth0.OIdcClient.MAUI
Once the SDK has been installed, you can integrate it by instantiating the Auth0Client:
var client = new Auth0Client(new Auth0ClientOptions()
{
Domain = "YOUR_AUTH0_DOMAIN",
ClientId = "YOUR_AUTH0_CLIENT_ID",
RedirectUri = "myapp://callback",
PostLogoutRedirectUri = "myapp://callback"
});
In order to use the SDK with Android and Windows, you need some platform specific configuration.
Create a new Activity that extends WebAuthenticatorCallbackActivity:
[Activity(NoHistory = true, LaunchMode = LaunchMode.SingleTop, Exported = true)]
[IntentFilter(new[] { Intent.ActionView },
Categories = new[] { Intent.CategoryDefault, Intent.CategoryBrowsable },
DataScheme = CALLBACK_SCHEME)]
public class WebAuthenticatorActivity : Microsoft.Maui.Authentication.WebAuthenticatorCallbackActivity
{
const string CALLBACK_SCHEME = "myapp";
}
The above activity will ensure the application can handle the myapp://callback URL when Auth0 redirects back to the Android application after logging in.
To make sure it can properly reactivate your application after being redirected back go Auth0, you need to do two things:
Package.appxmanifest. In this case, this is set to myapp, but you can change this to whatever you like (ensure to update all relevant Auth0 URLs as well).
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
<Extensions>
<uap:Extension Category="windows.protocol">
<uap:Protocol Name="myapp"/>
</uap:Extension>
</Extensions>
</Application>
</Applications>
Activator.Default.CheckRedirectionActivation() in the Windows specific App.xaml.cs file.
public App()
{
if (Auth0.OidcClient.Platforms.Windows.Activator.Default.CheckRedirectionActivation())
return;
this.InitializeComponent();
}
In order to add login, you can call LoginAsync on the Auth0Client instance.
var loginResult = await client.LoginAsync();
The returned LoginResult indicates whether or not the request was succesful through the IsError property. Incase it was succesful, you can retrieve the user using the LoginResult.User property.
if (loginResult.IsError == false)
{
var user = loginResult.User
}
Logging out of the SDK comes down to calling LogoutAsync on the Auth0Client instance.
await client.LogoutAsync();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-android33.0.95 net8.0-android33.0.95 is compatible. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-ios16.4.7142 net8.0-ios16.4.7142 is compatible. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-maccatalyst16.4.7142 net8.0-maccatalyst16.4.7142 is compatible. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net8.0-windows10.0.19041 net8.0-windows10.0.19041 is compatible. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-android33.0.95 net9.0-android33.0.95 is compatible. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-ios16.4.7142 net9.0-ios16.4.7142 is compatible. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-maccatalyst16.4.7142 net9.0-maccatalyst16.4.7142 is compatible. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net9.0-windows10.0.19041 net9.0-windows10.0.19041 is compatible. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.4.0 | 61,925 | 7/22/2025 |
| 1.3.0 | 12,705 | 4/16/2025 |
| 1.2.0 | 11,308 | 3/26/2025 |
| 1.1.0 | 24,523 | 1/16/2025 |
| 1.1.0-beta.0 | 2,104 | 12/10/2024 |
| 1.0.1 | 58,899 | 4/29/2024 |
| 1.0.0 | 8,595 | 1/4/2024 |
| 1.0.0-beta.1 | 347 | 10/31/2023 |
| 1.0.0-beta.0 | 181 | 10/30/2023 |
Version 1.4.0
- Update Auth0.OidcClient.Core to 4.2.0
Version 1.3.0
- Update Auth0.OidcClient.Core to 4.1.0
- Replace IdentityModel.OidcClient Package with Duende.IdentityModelOidcClient v6.0.1
Version 1.2.0
- Support .NET 9
Version 1.1.0
- Upgrade to .NET 8
Version 1.1.0-beta.0
- Upgrade to .NET 8
Version 1.0.1
- Add net-6.0 target to Auth0 MAUI NuGet package.
- Bump Auth0.OidcClient.Core to v4, removing support for ClientSecret
Version 1.0.0
- Initial release for adding support for MAUI on Android, iOS, macOS, and Windows.
Version 1.0.0-beta.1
- Update README
Version 1.0.0-beta.0
- Initial beta release for adding support for MAUI on Android, iOS, macOS, and Windows.