mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-03 03:14:34 -05:00
803a73afb6
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com> Co-authored-by: Matti Nannt <mail@matthiasnannt.com>
22 lines
589 B
TypeScript
22 lines
589 B
TypeScript
"use server";
|
|
|
|
import { actionClient } from "@/lib/utils/action-client";
|
|
import jackson from "@/modules/ee/auth/saml/lib/jackson";
|
|
import { SAML_PRODUCT, SAML_TENANT } from "@formbricks/lib/constants";
|
|
|
|
export const doesSamlConnectionExistAction = actionClient.action(async () => {
|
|
const jacksonInstance = await jackson();
|
|
|
|
if (!jacksonInstance) {
|
|
return false;
|
|
}
|
|
|
|
const { connectionController } = jacksonInstance;
|
|
const connection = await connectionController.getConnections({
|
|
product: SAML_PRODUCT,
|
|
tenant: SAML_TENANT,
|
|
});
|
|
|
|
return connection.length === 1;
|
|
});
|