This project is a FusionAuth-integrated Event Planner Application built using Express.js and Pug templates based on FusionAuth documentation. It showcases the implementation of user authentication, custom data storage, Two-Factor Authentication (2FA), and Role-Based Access Control (RBAC) using FusionAuth.
This application addresses the following requirements:
-
FusionAuth Quickstart and Local Setup:
- A local FusionAuth instance is running on port
9011. - The application is set up to authenticate users via FusionAuth.
- A local FusionAuth instance is running on port
-
Custom User Data:
- Users can add additional information like nickname, favorite event, and hobby to their profile.
- This data is stored in the
user.dataobject in FusionAuth.
-
Two-Factor Authentication (2FA):
- Users can enable or disable 2FA from their profile settings.
- If 2FA is enabled, users are prompted for a Time-Based One-Time Password (TOTP) during login.
-
Role-Based Access Control (RBAC):
- Roles like "Admin", "Editor", and "Viewer" have been implemented.
- Access to different parts of the application is restricted based on the user's role.
- FusionAuth Authentication: Authenticate users with FusionAuth, using secure OAuth2 flow with PKCE.
- Custom User Data: Store additional user data (e.g., nickname, event, hobby) in FusionAuth's custom data fields.
- Two-Factor Authentication (2FA): Allow users to enable/disable 2FA and require 2FA for login if enabled.
- Role-Based Access Control: Implement roles like Admin, Editor, and Viewer, and restrict access to certain features based on the user's role.
- Event Management: Authenticated users can create, view, edit, and delete events.
- Backend: Node.js, Express.js
- Frontend: Pug templates, Bootstrap
- Authentication: FusionAuth (OAuth2 + PKCE)
- Authorization: Role-based access control via FusionAuth roles
- Two-Factor Authentication: TOTP-based 2FA using FusionAuth
- Node.js installed on your machine.
- FusionAuth installed locally and running on port
9011.