simple_home_server/utils/auth.js
2024-03-21 09:59:10 +01:00

9 lines
274 B
JavaScript

import basicAuth from 'express-basic-auth';
export function myAuthorizer(username, password) {
const userMatches = basicAuth.safeCompare(username, 'admin')
const passwordMatches = basicAuth.safeCompare(password, 'admin')
return userMatches & passwordMatches
}