https://github.com/furesoft/avalonia.auth
An extendable login component for Avalonia
https://github.com/furesoft/avalonia.auth
authentication avalonia csharp login oauth
Last synced: 2 months ago
JSON representation
An extendable login component for Avalonia
- Host: GitHub
- URL: https://github.com/furesoft/avalonia.auth
- Owner: furesoft
- License: mit
- Created: 2025-07-18T13:05:31.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-04-16T04:14:34.000Z (2 months ago)
- Last Synced: 2026-04-16T06:29:55.750Z (2 months ago)
- Topics: authentication, avalonia, csharp, login, oauth
- Language: C#
- Homepage:
- Size: 80.2 MB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Avalonia.Auth
[](https://www.codefactor.io/repository/github/furesoft/Avalonia.Auth)


[](https://opensource.org/licenses/MIT)


[](https://github.com/furesoft/Avalonia.Auth)
Avalonia.Auth is a flexible and modern authentication library for Avalonia UI applications. It provides reusable UI components and easy integration of OAuth providers such as Google, GitHub, and Hello.
## Features
- **AuthContext**: Customizable authentication context for different providers
- **Provider-specific colors & icons**
- **Easy integration into Avalonia projects**
- **Extensible for additional OAuth providers**
- **Sample providers for Google, GitHub, and Hello included**
## Installation
1. Install the NuGet packages:
```shell
dotnet add package Avalonia.Auth
dotnet add package Avalonia.Auth.BrowserAuth
```
2. Install Providers
```shell
dotnet add package Avalonia.Auth.Provider.Github
```
3. Configure in Program.cs in BuildAvaloniaApp()
```csharp
.WithAuth(_ =>
{
_.AddProvider();
_.UseBrowserAuth();
})
```
4. Add the AuthContext to your Window:
```xml
xmlns:controls="http://furesoft.de/schemas/auth"
```
```xml
```
All providers that implement `AuthProvider` will be automatically displayed, when they are configured.
| :warning: Important |
|:----------------------------|
| If no UsernamePasswordProvider is configured the username and password fields are hidden. For Authentication an external Auth provider has to be registered (BrowserAuth or EmbeddedAuth) |
## Sample Application
A sample application demonstrating usage can be found in the `Sample` folder.

The AuthContext has two mode (Minimal, Default). When minimal mode is selected the icons of the providers will be smaller.
## Providers supported
- Google
- Helló
- Github
- Discord
- WorldID