mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-28 09:21:00 +01:00
13 lines
304 B
TypeScript
13 lines
304 B
TypeScript
import { TRPCError } from "@trpc/server";
|
|
|
|
import { env } from "@homarr/auth/env";
|
|
|
|
export const throwIfCredentialsDisabled = () => {
|
|
if (!env.AUTH_PROVIDERS.includes("credentials")) {
|
|
throw new TRPCError({
|
|
code: "FORBIDDEN",
|
|
message: "Credentials provider is disabled",
|
|
});
|
|
}
|
|
};
|