diff --git a/lib/mv_web/controllers/auth_controller.ex b/lib/mv_web/controllers/auth_controller.ex index 9282903..20a8b20 100644 --- a/lib/mv_web/controllers/auth_controller.ex +++ b/lib/mv_web/controllers/auth_controller.ex @@ -78,6 +78,12 @@ defmodule MvWeb.AuthController do end end + # Catch-all clause for any other error types + defp handle_rauthy_failure(conn, reason) do + Logger.warning("Unhandled Rauthy failure reason: #{inspect(reason)}") + redirect_with_error(conn, gettext("Unable to authenticate with OIDC. Please try again.")) + end + # Handle generic AuthenticationFailed errors defp handle_authentication_failed(conn, %Ash.Error.Forbidden{errors: errors}) do if Enum.any?(errors, &match?(%AshAuthentication.Errors.CannotConfirmUnconfirmedUser{}, &1)) do