1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #322] [MERGED] Feature - Advanced Authentication via Email #1003

Closed
opened 2026-05-07 00:15:26 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/322
Author: @cadtoolbox
Created: 2/10/2026
Status: Merged
Merged: 2/10/2026
Merged by: @maziggy

Base: 0.1.9bHead: feature_user_authentication


📝 Commits (10+)

  • 9e6f46a Revert commit 1d0fe70499c625da4928bd89f2af1fcb07e302ca
  • 453565d Initial plan
  • 1058f3f Add backend support for advanced authentication
  • 6bdd573 Add frontend support for forgot password and email login
  • 7264018 Add email field and reset password to UsersPage
  • 5462249 Add Email settings tab to SettingsPage with SMTP configuration
  • 1a6a53d Address code review feedback - fix hooks and random usage
  • f78514e Initial plan
  • b2ef293 Fix TypeScript compilation errors in EmailSettings and LoginPage
  • 84b5585 Plan: Fix import shadowing in email_service.py

📊 Changes

38 files changed (+15644 additions, -1359 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 backend/app/api/routes/auth.py (+388 -2)
📝 backend/app/api/routes/notification_templates.py (+3 -0)
📝 backend/app/api/routes/settings.py (+21 -0)
📝 backend/app/api/routes/users.py (+88 -6)
📝 backend/app/core/auth.py (+32 -4)
📝 backend/app/main.py (+2 -0)
📝 backend/app/models/notification_template.py (+12 -0)
📝 backend/app/models/user.py (+1 -0)
📝 backend/app/schemas/auth.py (+51 -1)
📝 backend/app/schemas/notification_template.py (+18 -0)
backend/app/services/email_service.py (+516 -0)
📝 backend/tests/integration/test_auth_api.py (+27 -0)
backend/tests/unit/services/test_email_service.py (+163 -0)
📝 frontend/package-lock.json (+3170 -1058)
📝 frontend/package.json (+3 -0)
📝 frontend/src/api/client.ts (+84 -1)
📝 frontend/src/components/AddSmartPlugModal.tsx (+11 -9)
📝 frontend/src/components/ConfigureAmsSlotModal.tsx (+6 -5)
frontend/src/components/CreateUserAdvancedAuthModal.tsx (+181 -0)

...and 18 more files

📄 Description

Description

Allows for streamlined user authentication via email saving workflow steps and time while improving security through a more robust approach for password creation.

Fixes #316

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

  • Set global SMTP settings to be used for general email communication and additional future enhancements.
  • Allows Admin to enter username and email address for the new user. The system would email the user the new secure and random password. No other user would know the password besides the new user. This is inherently more secure.
  • Password resets by the Admin would also be provided on a one-click basis. No manual entries required.
  • The user may now reset their own password if forgotten from the login screen.
  • Validates that the email address entered is correct as it's the only mechanism to receive the password.
  • Allows for notification message templates to be stored for the 'Welcome Email' and 'Password Reset'.
  • Can be enabled or disabled as an optional feature at any time.
  • Username/Email is not case sensitive for login.

Screenshots

2026-02-09_21-40-52
2026-02-09_21-40-28
2026-02-09_21-39-50
2026-02-09_21-39-13
2026-02-09_21-38-34

Testing

  • [ X] I have tested this on my local machine
  • I have tested with my printer model:

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/322 **Author:** [@cadtoolbox](https://github.com/cadtoolbox) **Created:** 2/10/2026 **Status:** ✅ Merged **Merged:** 2/10/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `0.1.9b` ← **Head:** `feature_user_authentication` --- ### 📝 Commits (10+) - [`9e6f46a`](https://github.com/maziggy/bambuddy/commit/9e6f46a2ad00ea533f5555cc88dcd3e2a1e1eacc) Revert commit 1d0fe70499c625da4928bd89f2af1fcb07e302ca - [`453565d`](https://github.com/maziggy/bambuddy/commit/453565d9f85757981de39b5637bb7e362ac596d4) Initial plan - [`1058f3f`](https://github.com/maziggy/bambuddy/commit/1058f3fd5cb8e91187330209d557eaea5abb9cfe) Add backend support for advanced authentication - [`6bdd573`](https://github.com/maziggy/bambuddy/commit/6bdd5730de12bda17959d463b661d81173635c66) Add frontend support for forgot password and email login - [`7264018`](https://github.com/maziggy/bambuddy/commit/726401810cb38a5b82d4337782c4f9d6f32cc973) Add email field and reset password to UsersPage - [`5462249`](https://github.com/maziggy/bambuddy/commit/5462249345bfd1cdb5600dfcebf33b1a1fc14810) Add Email settings tab to SettingsPage with SMTP configuration - [`1a6a53d`](https://github.com/maziggy/bambuddy/commit/1a6a53d92e4cc8a9bbd4551cddce1f771e26c5b2) Address code review feedback - fix hooks and random usage - [`f78514e`](https://github.com/maziggy/bambuddy/commit/f78514e14c47ffc9ae68c42442784066b5b2e5f2) Initial plan - [`b2ef293`](https://github.com/maziggy/bambuddy/commit/b2ef293e2d07b9bd3d1ff5601eff2a65a698f0c5) Fix TypeScript compilation errors in EmailSettings and LoginPage - [`84b5585`](https://github.com/maziggy/bambuddy/commit/84b5585e94873f92a9533aeb23e42f2afb7368c5) Plan: Fix import shadowing in email_service.py ### 📊 Changes **38 files changed** (+15644 additions, -1359 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `backend/app/api/routes/auth.py` (+388 -2) 📝 `backend/app/api/routes/notification_templates.py` (+3 -0) 📝 `backend/app/api/routes/settings.py` (+21 -0) 📝 `backend/app/api/routes/users.py` (+88 -6) 📝 `backend/app/core/auth.py` (+32 -4) 📝 `backend/app/main.py` (+2 -0) 📝 `backend/app/models/notification_template.py` (+12 -0) 📝 `backend/app/models/user.py` (+1 -0) 📝 `backend/app/schemas/auth.py` (+51 -1) 📝 `backend/app/schemas/notification_template.py` (+18 -0) ➕ `backend/app/services/email_service.py` (+516 -0) 📝 `backend/tests/integration/test_auth_api.py` (+27 -0) ➕ `backend/tests/unit/services/test_email_service.py` (+163 -0) 📝 `frontend/package-lock.json` (+3170 -1058) 📝 `frontend/package.json` (+3 -0) 📝 `frontend/src/api/client.ts` (+84 -1) 📝 `frontend/src/components/AddSmartPlugModal.tsx` (+11 -9) 📝 `frontend/src/components/ConfigureAmsSlotModal.tsx` (+6 -5) ➕ `frontend/src/components/CreateUserAdvancedAuthModal.tsx` (+181 -0) _...and 18 more files_ </details> ### 📄 Description ## Description <!-- Provide a brief description of your changes --> Allows for streamlined user authentication via email saving workflow steps and time while improving security through a more robust approach for password creation. ## Related Issue <!-- Link to the issue this PR addresses (if applicable) --> Fixes #316 ## Type of Change <!-- Mark the relevant option with an "x" --> - [X] Bug fix (non-breaking change that fixes an issue) - [X] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test addition or update ## Changes Made <!-- List the specific changes made in this PR --> - Set global SMTP settings to be used for general email communication and additional future enhancements. - Allows Admin to enter username and email address for the new user. The system would email the user the new secure and random password. No other user would know the password besides the new user. This is inherently more secure. - Password resets by the Admin would also be provided on a one-click basis. No manual entries required. - The user may now reset their own password if forgotten from the login screen. - Validates that the email address entered is correct as it's the only mechanism to receive the password. - Allows for notification message templates to be stored for the 'Welcome Email' and 'Password Reset'. - Can be enabled or disabled as an optional feature at any time. - Username/Email is not case sensitive for login. ## Screenshots <!-- If applicable, add screenshots to demonstrate your changes --> ![2026-02-09_21-40-52](https://github.com/user-attachments/assets/34eab0de-ff04-456d-a3a4-5a593f557adb) ![2026-02-09_21-40-28](https://github.com/user-attachments/assets/9f6eec65-2763-4565-9e1f-2776396d0b5f) ![2026-02-09_21-39-50](https://github.com/user-attachments/assets/4bb17c13-b151-4a4b-a711-ff25dee10cfb) ![2026-02-09_21-39-13](https://github.com/user-attachments/assets/9691818a-d254-4dbd-8818-ee813fcd21df) ![2026-02-09_21-38-34](https://github.com/user-attachments/assets/5d9363eb-dd57-4ded-bcaa-c08a361a45be) ## Testing <!-- Describe how you tested your changes --> - [ X] I have tested this on my local machine - [X] I have tested with my printer model: <!-- e.g., X1C, P1S, A1 --> ## Checklist - [X] My code follows the project's coding style - [X] I have commented my code where necessary - [ ] I have updated the documentation (if needed) - [X] My changes generate no new warnings - [X] I have tested my changes thoroughly ## Additional Notes <!-- Add any additional information that reviewers should know --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:15:26 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy-maziggy-1#1003
No description provided.