Files
smart-home/src/utils/basic-auth.ts

4 lines
123 B
TypeScript

export const basicAuth = (username: string, password: string) => {
return "Basic " + btoa(`${username}:${password}`);
};