import { compare } from 'bcrypt' export function isAuthenticated( username: string, plainPassword: string, map: Record, ): Promise { return compare(plainPassword, map[username] || '') }