.ts
TypeScript
(application/typescript)
// 1st-party
import { makeService } from "@ethicdevs/react-monolith";
// app
import type { AuthServiceAPI, AuthServiceDeps } from "./types";
import { makeCompareUserPasswordHashes } from "./compareUserPasswordHashes";
import { makeIsExistingUsername } from "./makeIsExistingUsername";

export const makeAuthService = makeService<AuthServiceAPI, AuthServiceDeps>({
  compareUserPasswordHashes: makeCompareUserPasswordHashes,
  isExistingUsername: makeIsExistingUsername,
  isExistingUserUid: () => () => undefined,
  findUserByUid: () => () => undefined,
  findUserByUsername: () => () => undefined,
  sendUserEmailAddressV8nEmail: () => () => undefined,
  validateUserEmailAddress: () => () => Promise.resolve(undefined),
});