[PR #100] [MERGED] feat: allow sign in with email #958

Closed
opened 2025-10-08 00:20:26 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pocket-id/pocket-id/pull/100
Author: @stonith404
Created: 1/6/2025
Status: Merged
Merged: 1/19/2025
Merged by: @stonith404

Base: mainHead: feature/email-sign-in


📝 Commits (10+)

  • d1618b7 feat: allow sign in with email
  • 3c2a603 fix: global rate limit overwrites rate limit per route
  • d36425f redirect to client authorization if email link requested on this page
  • 4b2f560 Merge branch 'main' into feature/email-sign-in
  • 2fa6ceb add ability to disable login notifications
  • 9a99a0c adapt tests
  • a17f16a Merge branch 'main' into feature/email-sign-in
  • 3d85fc2 Merge branch 'main' into feature/email-sign-in
  • ae456f1 Merge branch 'main' into feature/email-sign-in
  • 6283b85 fix checkbox spacing

📊 Changes

42 files changed (+422 additions, -145 deletions)

View changed files

📝 backend/internal/bootstrap/bootstrap.go (+0 -2)
📝 backend/internal/bootstrap/router_bootstrap.go (+7 -3)
📝 backend/internal/common/errors.go (+1 -1)
📝 backend/internal/controller/user_controller.go (+19 -2)
📝 backend/internal/dto/app_config_dto.go (+2 -1)
📝 backend/internal/dto/user_dto.go (+5 -0)
📝 backend/internal/job/db_cleanup.go (+1 -1)
📝 backend/internal/middleware/rate_limit.go (+8 -8)
📝 backend/internal/model/app_config.go (+2 -1)
📝 backend/internal/service/app_config_service.go (+19 -6)
📝 backend/internal/service/audit_log_service.go (+2 -2)
📝 backend/internal/service/email_service.go (+14 -9)
📝 backend/internal/service/email_service_templates.go (+13 -2)
📝 backend/internal/service/user_service.go (+53 -6)
📝 backend/internal/utils/email/email_service_templates.go (+0 -2)
📝 backend/resources/email-templates/components/style_html.tmpl (+15 -0)
📝 backend/resources/email-templates/login-with-new-device_html.tmpl (+1 -1)
backend/resources/email-templates/one-time-access_html.tmpl (+17 -0)
backend/resources/email-templates/one-time-access_text.tmpl (+8 -0)
📝 backend/resources/email-templates/test_html.tmpl (+1 -1)

...and 22 more files

📄 Description

This feature resolves #18 which suggest that users should be able to sign in with an link sent to their email. This function is only recommended for environment where security isn't a big concern like hosting it in the local network.

The feature has to be enabled in the settings:
image


🔄 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/pocket-id/pocket-id/pull/100 **Author:** [@stonith404](https://github.com/stonith404) **Created:** 1/6/2025 **Status:** ✅ Merged **Merged:** 1/19/2025 **Merged by:** [@stonith404](https://github.com/stonith404) **Base:** `main` ← **Head:** `feature/email-sign-in` --- ### 📝 Commits (10+) - [`d1618b7`](https://github.com/pocket-id/pocket-id/commit/d1618b74710046271d2fb2c8b3fef3745f91505e) feat: allow sign in with email - [`3c2a603`](https://github.com/pocket-id/pocket-id/commit/3c2a603300441499ed04fde38bedcb64c1865862) fix: global rate limit overwrites rate limit per route - [`d36425f`](https://github.com/pocket-id/pocket-id/commit/d36425ff2fd164ce8a7ba75477e6044cdfcdcc59) redirect to client authorization if email link requested on this page - [`4b2f560`](https://github.com/pocket-id/pocket-id/commit/4b2f56027342aa532be28dbd75654ac6e29303f9) Merge branch 'main' into feature/email-sign-in - [`2fa6ceb`](https://github.com/pocket-id/pocket-id/commit/2fa6ceb9bd6702740b8b3ba9d0589449bfc8ff9f) add ability to disable login notifications - [`9a99a0c`](https://github.com/pocket-id/pocket-id/commit/9a99a0c60b70ec81bdbf5d20fdb9c74f20e12a77) adapt tests - [`a17f16a`](https://github.com/pocket-id/pocket-id/commit/a17f16ad9b6c5f82d8751c6e388e255ad5d26095) Merge branch 'main' into feature/email-sign-in - [`3d85fc2`](https://github.com/pocket-id/pocket-id/commit/3d85fc24d5e6246bf6965c945254a4a91724037e) Merge branch 'main' into feature/email-sign-in - [`ae456f1`](https://github.com/pocket-id/pocket-id/commit/ae456f113dbd7a94890f39282f61aad13bdf4f30) Merge branch 'main' into feature/email-sign-in - [`6283b85`](https://github.com/pocket-id/pocket-id/commit/6283b852ac8f0a17362b10f8b34fa46d90dc4d67) fix checkbox spacing ### 📊 Changes **42 files changed** (+422 additions, -145 deletions) <details> <summary>View changed files</summary> 📝 `backend/internal/bootstrap/bootstrap.go` (+0 -2) 📝 `backend/internal/bootstrap/router_bootstrap.go` (+7 -3) 📝 `backend/internal/common/errors.go` (+1 -1) 📝 `backend/internal/controller/user_controller.go` (+19 -2) 📝 `backend/internal/dto/app_config_dto.go` (+2 -1) 📝 `backend/internal/dto/user_dto.go` (+5 -0) 📝 `backend/internal/job/db_cleanup.go` (+1 -1) 📝 `backend/internal/middleware/rate_limit.go` (+8 -8) 📝 `backend/internal/model/app_config.go` (+2 -1) 📝 `backend/internal/service/app_config_service.go` (+19 -6) 📝 `backend/internal/service/audit_log_service.go` (+2 -2) 📝 `backend/internal/service/email_service.go` (+14 -9) 📝 `backend/internal/service/email_service_templates.go` (+13 -2) 📝 `backend/internal/service/user_service.go` (+53 -6) 📝 `backend/internal/utils/email/email_service_templates.go` (+0 -2) 📝 `backend/resources/email-templates/components/style_html.tmpl` (+15 -0) 📝 `backend/resources/email-templates/login-with-new-device_html.tmpl` (+1 -1) ➕ `backend/resources/email-templates/one-time-access_html.tmpl` (+17 -0) ➕ `backend/resources/email-templates/one-time-access_text.tmpl` (+8 -0) 📝 `backend/resources/email-templates/test_html.tmpl` (+1 -1) _...and 22 more files_ </details> ### 📄 Description This feature resolves #18 which suggest that users should be able to sign in with an link sent to their email. This function is only recommended for environment where security isn't a big concern like hosting it in the local network. The feature has to be enabled in the settings: ![image](https://github.com/user-attachments/assets/edfd3162-90ea-4f82-a657-392b6d3ec5b9) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2025-10-08 00:20:26 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#958