Skip to content

furesoft/Avalonia.Auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

CodeFactor NuGet Version NuGet Downloads License: GPL v3 Discord Libraries.io SourceRank

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:

    dotnet add package Avalonia.Auth
    dotnet add package Avalonia.Auth.BrowserAuth
  2. Install Providers

    dotnet add package Avalonia.Auth.Github
  3. Configure in Program.cs in BuildAvaloniaApp()

             .WithAuth(_ =>
             {
                 _.AddProvider<GithubProvider>();
                 _.UseBrowserAuth();
             })
  4. Add the AuthContext to your Window:

    xmlns:controls="clr-namespace:Avalonia.Auth.Controls;assembly=Avalonia.Auth"
    <controls:AuthContext />

All providers that implement AuthProvider will be automatically displayed, when they are configured.

⚠️ 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.

License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).


Providers supported

  • Google
  • Helló
  • Github
  • Discord

[ ] Facebook

[ ] Gitlab

[ ] LinkedIn

[ ] Microsoft

[ ] Reddit

[ ] Twitch

About

An extendable login component for Avalonia

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages