Skip to content

feat: コントロールパネルから二要素認証を解除できるように#17614

Open
kakkokari-gtyih wants to merge 2 commits into
misskey-dev:developfrom
kakkokari-gtyih:enh-mfa-reset
Open

feat: コントロールパネルから二要素認証を解除できるように#17614
kakkokari-gtyih wants to merge 2 commits into
misskey-dev:developfrom
kakkokari-gtyih:enh-mfa-reset

Conversation

@kakkokari-gtyih

Copy link
Copy Markdown
Member

What

二要素認証(TOTP・パスキー)を解除できるように

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

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 24, 2026
@github-actions github-actions Bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js labels Jun 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Frontend Bundle Report

Chunk size diff (11 updated, 0 added, 0 removed)
Chunk Before After Δ Δ (%)
(total) 5.6 MiB 5.6 MiB $\color{orange}{\text{+31 KiB}}$ $\color{orange}{\text{+1\%}}$
dist ja-JP/iYI1rAqfE-hFIZJiGe.js
1.7 KiB 31 KiB $\color{orange}{\text{+29 KiB}}$ $\color{orange}{\text{+1673\%}}$
src/pages/admin/modlog.vue ja-JP/iYI1rAqfE-f22ZbZCx2.js
149 KiB 149 KiB $\color{orange}{\text{+330 B}}$ $\color{orange}{\text{+0\%}}$
src/pages/admin-user.vue ja-JP/iYI1rAqfE-Cyou7Rwc.js
15 KiB 15 KiB $\color{orange}{\text{+329 B}}$ $\color{orange}{\text{+2\%}}$
i18n ja-JP/iYI1rAqfE-r2YyMu-f.js
210 KiB 210 KiB $\color{orange}{\text{+239 B}}$ $\color{orange}{\text{+0\%}}$
src/components/MkTokenGenerateWindow.vue ja-JP/iYI1rAqfE-YdZE4L2T2.js
12 KiB 12 KiB $\color{orange}{\text{+144 B}}$ $\color{orange}{\text{+1\%}}$
src/pages/install-extensions.vue ja-JP/iYI1rAqfE-CleY8M942.js
14 KiB 14 KiB $\color{orange}{\text{+72 B}}$ $\color{orange}{\text{+1\%}}$
MkAuthConfirm ja-JP/iYI1rAqfE-DzpKUtND2.js
11 KiB 11 KiB $\color{orange}{\text{+72 B}}$ $\color{orange}{\text{+1\%}}$
src/pages/settings/plugin.vue ja-JP/iYI1rAqfE-Cz_KG8Yv2.js
9.3 KiB 9.4 KiB $\color{orange}{\text{+72 B}}$ $\color{orange}{\text{+1\%}}$
src/pages/auth.vue ja-JP/iYI1rAqfE-BJed63ha.js
8.2 KiB 8.3 KiB $\color{orange}{\text{+72 B}}$ $\color{orange}{\text{+1\%}}$
src/pages/settings/apps.vue ja-JP/iYI1rAqfE-DrKGoyEI2.js
7 KiB 7.1 KiB $\color{orange}{\text{+72 B}}$ $\color{orange}{\text{+1\%}}$
built ja-JP/iYI1rAqfE-CMqvco8K.js
21 KiB 21 KiB $\color{orange}{\text{+31 B}}$ $\color{orange}{\text{+0\%}}$
Startup chunk size (3 updated, 0 added, 0 removed)
Chunk Before After Δ Δ (%)
(total) 1 MiB 1.1 MiB $\color{orange}{\text{+29 KiB}}$ $\color{orange}{\text{+3\%}}$
dist ja-JP/iYI1rAqfE-hFIZJiGe.js
1.7 KiB 31 KiB $\color{orange}{\text{+29 KiB}}$ $\color{orange}{\text{+1673\%}}$
i18n ja-JP/iYI1rAqfE-r2YyMu-f.js
210 KiB 210 KiB $\color{orange}{\text{+239 B}}$ $\color{orange}{\text{+0\%}}$
built ja-JP/iYI1rAqfE-CMqvco8K.js
21 KiB 21 KiB $\color{orange}{\text{+31 B}}$ $\color{orange}{\text{+0\%}}$
os ja-JP/iYI1rAqfE-DHB5SqPp.js
454 KiB 454 KiB 0 B 0%
photoswipe ja-JP/iYI1rAqfE-CPLOodwB.js
72 KiB 72 KiB 0 B 0%
src/_boot_.ts ja-JP/iYI1rAqfE-DxNuD77v.js
62 KiB 62 KiB 0 B 0%
runtime-core.esm-bundler ja-JP/iYI1rAqfE-DXDahymz.js
48 KiB 48 KiB 0 B 0%
MkNotification ja-JP/iYI1rAqfE-DbWMj3PN2.js
22 KiB 22 KiB 0 B 0%
store ja-JP/iYI1rAqfE-BUQHLGfG.js
22 KiB 22 KiB 0 B 0%
reactivity.esm-bundler ja-JP/iYI1rAqfE-CGANOlW1.js
20 KiB 20 KiB 0 B 0%
runtime-dom.esm-bundler ja-JP/iYI1rAqfE-BWJgF_dO.js
16 KiB 16 KiB 0 B 0%
tinycolor ja-JP/iYI1rAqfE-PEGdpOg42.js
15 KiB 15 KiB 0 B 0%
common ja-JP/iYI1rAqfE-CBHTOmOK2.js
15 KiB 15 KiB 0 B 0%
achievements ja-JP/iYI1rAqfE-D0vV4RBq.js
10 KiB 10 KiB 0 B 0%
widgets ja-JP/iYI1rAqfE-BL5S_7HM.js
9.4 KiB 9.4 KiB 0 B 0%
theme ja-JP/iYI1rAqfE-BXbIqFh12.js
8.1 KiB 8.1 KiB 0 B 0%
MkCustomEmoji ja-JP/iYI1rAqfE-BIM99Wjp2.js
6.3 KiB 6.3 KiB 0 B 0%
pref-migrate ja-JP/iYI1rAqfE-AaLtVew-2.js
5 KiB 5 KiB 0 B 0%
MkAnimBg ja-JP/iYI1rAqfE--qsVmNPm2.js
4.7 KiB 4.7 KiB 0 B 0%
MkSwiper ja-JP/iYI1rAqfE-CllycdIS2.js
2.9 KiB 2.9 KiB 0 B 0%
navbar ja-JP/iYI1rAqfE-C9jvsZBd.js
2.8 KiB 2.8 KiB 0 B 0%
MkUrl ja-JP/iYI1rAqfE-C0hD-SDG2.js
2.8 KiB 2.8 KiB 0 B 0%
MkTabs ja-JP/iYI1rAqfE-s0MAVPcZ2.js
2.7 KiB 2.7 KiB 0 B 0%
MkCode ja-JP/iYI1rAqfE-CPa6j-962.js
2.6 KiB 2.6 KiB 0 B 0%
lookup ja-JP/iYI1rAqfE-7CcNPvPn.js
2.2 KiB 2.2 KiB 0 B 0%
MkSparkle ja-JP/iYI1rAqfE-DCmEmJci2.js
2.1 KiB 2.1 KiB 0 B 0%
_dark ja-JP/iYI1rAqfE-DfGzfoC32.js
1.7 KiB 1.7 KiB 0 B 0%
media-proxy ja-JP/iYI1rAqfE-CMewiYHt.js
1.7 KiB 1.7 KiB 0 B 0%
_light ja-JP/iYI1rAqfE-D67CB4xl.js
1.7 KiB 1.7 KiB 0 B 0%
hotkey ja-JP/iYI1rAqfE-kiz8ZpH0.js
1.6 KiB 1.6 KiB 0 B 0%
is-birthday ja-JP/iYI1rAqfE-krHBkp1C2.js
1.5 KiB 1.5 KiB 0 B 0%
MkStickyContainer ja-JP/iYI1rAqfE-y7RxNTit2.js
1.4 KiB 1.4 KiB 0 B 0%
config ja-JP/iYI1rAqfE-DoY2Dlc1.js
1.3 KiB 1.3 KiB 0 B 0%
preload-helper ja-JP/iYI1rAqfE-CYrt_hbD.js
1.2 KiB 1.2 KiB 0 B 0%
MkLoading ja-JP/iYI1rAqfE-DpyoDtql2.js
1.1 KiB 1.1 KiB 0 B 0%
MkInfo ja-JP/iYI1rAqfE-DMqSoszZ.js
1 KiB 1 KiB 0 B 0%
webgl ja-JP/iYI1rAqfE-wb3e_Vqx2.js
1 KiB 1 KiB 0 B 0%
use-scroll-position-keeper ja-JP/iYI1rAqfE-CwXCTaQz2.js
990 B 990 B 0 B 0%
misskey-api ja-JP/iYI1rAqfE-Cuo_-eGy.js
986 B 986 B 0 B 0%
instance ja-JP/iYI1rAqfE-DCSm3ObG.js
918 B 918 B 0 B 0%
get-note-summary ja-JP/iYI1rAqfE-CfIrEs7z.js
704 B 704 B 0 B 0%
rolldown-runtime ja-JP/iYI1rAqfE-QTnfLwEv.js
694 B 694 B 0 B 0%
page ja-JP/iYI1rAqfE-CrFU2vhJ.js
688 B 688 B 0 B 0%
i ja-JP/iYI1rAqfE-U6KxuKTI.js
631 B 631 B 0 B 0%
clear-cache ja-JP/iYI1rAqfE-Oefiv7--2.js
472 B 472 B 0 B 0%
emoji-base ja-JP/iYI1rAqfE-BWqNnsCl2.js
435 B 435 B 0 B 0%
d-green-lime ja-JP/iYI1rAqfE-DEHvjKGz.js
391 B 391 B 0 B 0%
use-interval ja-JP/iYI1rAqfE-DT6UfnZ3.js
384 B 384 B 0 B 0%
l-light ja-JP/iYI1rAqfE-B8GJAiDX.js
351 B 351 B 0 B 0%
user ja-JP/iYI1rAqfE-BmMN1NSu.js
205 B 205 B 0 B 0%
get-bg-color ja-JP/iYI1rAqfE-BvZiEOuT2.js
190 B 190 B 0 B 0%
isChromatic ja-JP/iYI1rAqfE-Dd9satMa2.js
172 B 172 B 0 B 0%
is-device-darkmode ja-JP/iYI1rAqfE-CHGi6RJT2.js
93 B 93 B 0 B 0%
_plugin-vue_export-helper ja-JP/iYI1rAqfE-BDNMzG2s.js
84 B 84 B 0 B 0%

Startup chunks are the Vite entry for src/_boot_.ts and its static imports.

Bundle Stats

Bundles Modules Entries Imports Size
Static Dynamic Rendered Gzip Brotli
Before 467 2,850 21 8,649 324 9.7 MiB 2.7 MiB 2.3 MiB
After 467 2,850 21 8,649 324 9.7 MiB 2.7 MiB 2.3 MiB
Δ 0 0 0 0 0 $\color{orange}{\text{+970 B}}$ $\color{orange}{\text{+60 B}}$ $\color{green}{\text{-40 B}}$
Δ (%) 0% 0% 0% 0% 0% $\color{orange}{\text{+0\%}}$ $\color{orange}{\text{+0\%}}$ $\color{green}{\text{-0\%}}$

Download detailed HTML

@github-actions

Copy link
Copy Markdown
Contributor

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

差分はこちら
--- base
+++ head
@@ -18521,6 +18521,163 @@
         }
       }
     },
+    "/admin/unset-mfa": {
+      "post": {
+        "operationId": "post___admin___unset-mfa",
+        "summary": "admin/unset-mfa",
+        "description": "No description provided.\n\n**Credential required**: *Yes* / **Permission**: *write:admin:unset-mfa*",
+        "externalDocs": {
+          "description": "Source code",
+          "url": "https://github.com/misskey-dev/misskey/blob/develop/packages/backend/src/server/api/endpoints/admin/unset-mfa.ts"
+        },
+        "tags": [
+          "admin"
+        ],
+        "security": [
+          {
+            "bearerAuth": []
+          }
+        ],
+        "requestBody": {
+          "required": true,
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "userId": {
+                    "type": "string",
+                    "format": "misskey:id"
+                  }
+                },
+                "required": [
+                  "userId"
+                ]
+              }
+            }
+          }
+        },
+        "responses": {
+          "204": {
+            "description": "OK (without any results)"
+          },
+          "400": {
+            "description": "Client error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "NO_SUCH_USER": {
+                    "value": {
+                      "error": {
+                        "message": "No such user.",
+                        "code": "NO_SUCH_USER",
+                        "id": "ccafc7fe-5074-4edd-9dc0-8ef9ef6a701d"
+                      }
+                    }
+                  },
+                  "INVALID_PARAM": {
+                    "value": {
+                      "error": {
+                        "message": "Invalid param.",
+                        "code": "INVALID_PARAM",
+                        "id": "3d81ceae-475f-4600-b2a8-2bc116157532"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "401": {
+            "description": "Authentication error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "CREDENTIAL_REQUIRED": {
+                    "value": {
+                      "error": {
+                        "message": "Credential required.",
+                        "code": "CREDENTIAL_REQUIRED",
+                        "id": "1384574d-a912-4b81-8601-c7b1c4085df1"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "403": {
+            "description": "Forbidden error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "AUTHENTICATION_FAILED": {
+                    "value": {
+                      "error": {
+                        "message": "Authentication failed. Please ensure your token is correct.",
+                        "code": "AUTHENTICATION_FAILED",
+                        "id": "b0a7f5f8-dc2f-4171-b91f-de88ad238e14"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "418": {
+            "description": "I'm Ai",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "I_AM_AI": {
+                    "value": {
+                      "error": {
+                        "message": "You sent a request to Ai-chan, Misskey's showgirl, instead of the server.",
+                        "code": "I_AM_AI",
+                        "id": "60c46cd1-f23a-46b1-bebe-5d2b73951a84"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          },
+          "500": {
+            "description": "Internal server error",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Error"
+                },
+                "examples": {
+                  "INTERNAL_ERROR": {
+                    "value": {
+                      "error": {
+                        "message": "Internal error occurred. Please contact us if the error persists.",
+                        "code": "INTERNAL_ERROR",
+                        "id": "5d37dbcb-891e-41ca-a3d6-e690c97775ac"
+                      }
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    },
     "/admin/unset-user-avatar": {
       "post": {
         "operationId": "post___admin___unset-user-avatar",

Get diff files from Workflow Page

@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.21%. Comparing base (1173550) to head (53b6de4).
⚠️ Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
...ackend/src/server/api/endpoints/admin/unset-mfa.ts 0.00% 15 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #17614       +/-   ##
============================================
+ Coverage    15.14%   25.21%   +10.07%     
============================================
  Files          248     1164      +916     
  Lines        12416    39904    +27488     
  Branches      4214    11093     +6879     
============================================
+ Hits          1880    10062     +8182     
- Misses        8245    23915    +15670     
- Partials      2291     5927     +3636     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Backend Memory Usage Report

After GC

Metric Base Head Δ Δ (%)
HeapUsed 89.32 MB
± 0.02 MB
89.35 MB
± 0.02 MB
$\color{orange}{\text{+0.03 MB}}$ $\color{orange}{\text{+0.03\%}}$
Pss 282.97 MB
± 1.4 MB
282.7 MB
± 0.79 MB
$\color{green}{\text{-0.27 MB}}$ $\color{green}{\text{-0.09\%}}$
Private_Dirty 219.97 MB
± 1.73 MB
219.92 MB
± 0.77 MB
$\color{green}{\text{-0.05 MB}}$ $\color{green}{\text{-0.02\%}}$
VmRSS 315.15 MB
± 1.38 MB
314.84 MB
± 0.88 MB
$\color{green}{\text{-0.31 MB}}$ $\color{green}{\text{-0.1\%}}$
External 3.82 MB
± 0 MB
3.82 MB
± 0 MB
0 MB 0%

Paired Delta Summary

Metric Δ median Δ MAD Δ min Δ max
HeapUsed $\color{orange}{\text{+0.04 MB}}$ 0.05 MB $\color{green}{\text{-0.05 MB}}$ $\color{orange}{\text{+0.14 MB}}$
Pss $\color{orange}{\text{+0.09 MB}}$ 2.24 MB $\color{green}{\text{-15.93 MB}}$ $\color{orange}{\text{+17.3 MB}}$
Private_Dirty $\color{orange}{\text{+0.23 MB}}$ 2.77 MB $\color{green}{\text{-15.87 MB}}$ $\color{orange}{\text{+17.22 MB}}$
VmRSS $\color{orange}{\text{+0.09 MB}}$ 2.29 MB $\color{green}{\text{-15.89 MB}}$ $\color{orange}{\text{+17.4 MB}}$
External 0 MB 0 MB $\color{green}{\text{-0.01 MB}}$ $\color{orange}{\text{+0.01 MB}}$

Runtime Loaded JS Footprint

Click to show
Metric Base Head Δ Δ (%)
Loaded JS modules 136 136 0 0%
Loaded JS source 12.43 MiB 12.43 MiB +1.22 KiB +0.01%
External packages loaded 23 23 0 0%
Native addon packages 1 1 0 0%

Largest Newly Loaded Modules

Module Package Loaded JS
packages/backend/built/ApNoteService-l9jKETBK.js backend 3.57 MiB
packages/backend/built/ServerService-8HI1Bd7c.js backend 949.78 KiB
packages/backend/built/endpoints-BWh5BtcR.js backend 852.09 KiB
packages/backend/built/MetaEntityService-BZTrHNyz.js backend 611.96 KiB
packages/backend/built/gen-spec-BjQdGSP3.js backend 55.72 KiB
packages/backend/built/GlobalModule-DqA2Ydkn.js backend 51.16 KiB

See workflow logs for details

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 size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Development

Successfully merging this pull request may close these issues.

1 participant