Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: ログイン試行時/失敗時の通知&メール送信 #15263

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

chan-mai
Copy link

What

  • ログイン試行失敗時に通知を発行するように (+ メールで通知)
  • ログイン通知にIPを含めるように

Why

  • ログイン失敗時の通知がなく、セキュリティ的によろしくないため
  • ログインされたという事象を通知するだけでは判別することが容易でないシーンがあるため

Additional info (optional)

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js packages/sw labels Jan 12, 2025
Copy link

codecov bot commented Jan 12, 2025

Codecov Report

Attention: Patch coverage is 33.73494% with 55 lines in your changes missing coverage. Please review.

Project coverage is 40.38%. Comparing base (a3d236c) to head (d700613).
Report is 560 commits behind head on develop.

Files with missing lines Patch % Lines
...ackages/backend/src/server/api/SigninApiService.ts 9.09% 20 Missing ⚠️
...ackages/frontend/src/components/MkNotification.vue 0.00% 17 Missing ⚠️
packages/backend/src/server/api/SigninService.ts 0.00% 9 Missing ⚠️
packages/backend/src/models/Notification.ts 0.00% 6 Missing ⚠️
...end/src/core/entities/NotificationEntityService.ts 75.00% 2 Missing ⚠️
...ages/frontend/src/pages/settings/notifications.vue 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #15263      +/-   ##
===========================================
- Coverage    41.74%   40.38%   -1.37%     
===========================================
  Files         1549     1607      +58     
  Lines       196555   210186   +13631     
  Branches      2767     4047    +1280     
===========================================
+ Hits         82055    84875    +2820     
- Misses      113939   124673   +10734     
- Partials       561      638      +77     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Jan 12, 2025

このPRによるapi.jsonの差分

差分はこちら
--- base
+++ head
@@ -50962,6 +50962,7 @@
                         "achievementEarned",
                         "exportCompleted",
                         "login",
+                        "loginFailed",
                         "app",
                         "test",
                         "pollVote",
@@ -50988,6 +50989,7 @@
                         "achievementEarned",
                         "exportCompleted",
                         "login",
+                        "loginFailed",
                         "app",
                         "test",
                         "pollVote",
@@ -51205,6 +51207,7 @@
                         "achievementEarned",
                         "exportCompleted",
                         "login",
+                        "loginFailed",
                         "app",
                         "test",
                         "reaction:grouped",
@@ -51233,6 +51236,7 @@
                         "achievementEarned",
                         "exportCompleted",
                         "login",
+                        "loginFailed",
                         "app",
                         "test",
                         "reaction:grouped",
@@ -80685,12 +80689,44 @@
                 "enum": [
                   "login"
                 ]
+              },
+              "ip": {
+                "type": "string"
+              }
+            },
+            "required": [
+              "id",
+              "createdAt",
+              "type",
+              "ip"
+            ]
+          },
+          {
+            "type": "object",
+            "properties": {
+              "id": {
+                "type": "string",
+                "format": "id"
+              },
+              "createdAt": {
+                "type": "string",
+                "format": "date-time"
+              },
+              "type": {
+                "type": "string",
+                "enum": [
+                  "loginFailed"
+                ]
+              },
+              "ip": {
+                "type": "string"
               }
             },
             "required": [
               "id",
               "createdAt",
-              "type"
+              "type",
+              "ip"
             ]
           },
           {

Get diff files from Workflow Page

@chan-mai
Copy link
Author

userid: を消去してname(@username)の形式で表示するよう変更しました

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js packages/sw
Projects
Development

Successfully merging this pull request may close these issues.

3 participants