mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-06 05:07:36 -05:00
15 lines
511 B
TypeScript
15 lines
511 B
TypeScript
import { Authenticator } from "remix-auth";
|
|
import { DiscordStrategy } from "./DiscordStrategy.server";
|
|
import type { LoggedInUser } from "./DiscordStrategy.server";
|
|
import { sessionStorage } from "./session.server";
|
|
|
|
export const DISCORD_AUTH_KEY = "discord";
|
|
export const SESSION_KEY = "user";
|
|
export const IMPERSONATED_SESSION_KEY = "impersonated_user";
|
|
|
|
export const authenticator = new Authenticator<LoggedInUser>(sessionStorage, {
|
|
sessionKey: SESSION_KEY,
|
|
});
|
|
|
|
authenticator.use(new DiscordStrategy());
|