Bypass app password for site admins

This commit is contained in:
seo
2026-06-12 15:45:02 +09:00
parent baeccf9d58
commit 70d207f807
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -76,6 +76,11 @@ async function hasAdminSession() {
async function requireAccess(nextAction) {
try {
if (await hasAdminSession()) {
nextAction && nextAction();
return;
}
const session = await fetch(`${apiUrl}?session=1`, { credentials: 'same-origin' }).then(res => res.json());
if (session.authenticated) {
nextAction && nextAction();