UsersPlugin
Plugin for WebFramework that adds a simple interface to register, log in and manage your account settings.
Changelog
Repository on GitHub
Main features
- Registering as a user (with mail verification)
- Logging in as a user (with 2FA)
- Logging out, logging all other session out
- Managing users (only as an administrator)
- Setting your theme
- Changing your username, email address and password
- Managing your account's two-factor authentication
- Scheduling your account for deletion
- Account recovery (forgotten username or password)
Installation
You can add this plugin to your WF project by installing the NuGet package: uwap.UsersPlugin
You can also download the source code and reference it in your project file.
Once installed, add the following things to your program start code:
- Add
using uwap.WebFramework.Plugins;
to the top, otherwise you have to prepend it toUsersPlugin
- Create a new object of the plugin:
UsersPlugin usersPlugin = new();
- Map the plugin to a path of your choosing (like any/account):
PluginManager.Map("any/account", usersPlugin);
You can do all that with a single line of code before starting the WF server:PluginManager.Map("any/account", new uwap.WebFramework.Plugins.UsersPlugin());
If you map the plugin to a path that isn't /account
, you need to change the following properties in AccountManager.Settings
accordingly:TwoFactorPath = "/account/2fa"
MailVerifyPath = "/account/verify"
LoginAllowedPaths = new[] {"/account/logout"}
LoginPath = "/account/login"
Plans for the future
- New theme settings (design+background+accent+font instead of fully preset themes)
- Making the worker delete accounts that are past their date of scheduled deletion
- More options for user management
- Notification settings