2022-05-14 10:22:06 +00:00
|
|
|
import { Authenticator } from "remix-auth";
|
|
|
|
import { FormStrategy } from "remix-auth-form";
|
|
|
|
|
|
|
|
import { sessionStorage } from "./session.server";
|
2022-05-21 19:33:23 +00:00
|
|
|
import { type SessionData, login } from "./auth.server";
|
2022-05-14 10:22:06 +00:00
|
|
|
|
2022-05-21 19:33:23 +00:00
|
|
|
const authenticator = new Authenticator<SessionData>(sessionStorage);
|
2022-05-14 10:22:06 +00:00
|
|
|
|
|
|
|
authenticator.use(new FormStrategy(login), "email-password");
|
|
|
|
|
|
|
|
export default authenticator;
|