Bypass app password for site admins

This commit is contained in:
seo
2026-06-12 15:45:02 +09:00
parent a1bb947ab5
commit af67ef9980
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();