Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

1.5 KB
Raw Blame
export const ENTERPRISE_SSO_REQUIRED_MESSAGE =
  "You must sign in via custom Enterprise SSO for this domain. Enter your email on the sign-in page and press Continue.";

// Thrown by the NextAuth signIn callback (web/src/server/auth.ts) when a
// multi-tenant SSO provider is used with an email of a different domain.
// NextAuth redirects the thrown message verbatim to /auth/error?error=<message>,
// where it is matched to classify the render as an expected outcome.
export const MULTI_TENANT_SSO_DOMAIN_MISMATCH_MESSAGE =
  "This domain is not associated with this SSO provider.";

// Thrown by the credentials provider when LANGFUSE_REQUIRE_FIPS=true and the
// stored password is a bcrypt hash, which FIPS mode does not verify.
export const PASSWORD_RESET_REQUIRED_MESSAGE =
  'This instance runs in FIPS mode and your password must be reset. Use "forgot password?" to set a new one, or contact your administrator.';

// Each protected surface sends its own Turnstile action; siteverify must
// return the same value. Cloudflare limits actions to 32 characters of
// letters, digits, underscores, and hyphens.
export const TURNSTILE_ACTIONS = {
  login: "login",
  signup: "signup",
  signupVerify: "signup_verify",
  // Password-reset and password-setup both send the code through the
  // NextAuth email provider.
  passwordReset: "password_reset",
} as const;

export type TurnstileAction =
  (typeof TURNSTILE_ACTIONS)[keyof typeof TURNSTILE_ACTIONS];

export const TURNSTILE_FAILED_MESSAGE =
  "Captcha verification failed. Please complete the captcha and try again.";