#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
import { useAppConfig } from "@editor/contexts/AppConfigContext";
import { useSelfHostedAuth } from "@editor/hooks/useSelfHostedAuth";
/**
* Desktop override: shared (group) signing requires self-hosted mode AND
* an authenticated session. Returns false in SaaS/local mode or when logged out.
*/
export function useGroupSigningEnabled(): boolean {
return useGroupSigningState().enabled;
}
/** Waits for desktop mode, authentication and config before confirming availability. */
export function useGroupSigningState(): { enabled: boolean; settled: boolean } {
const { config, loading: configLoading } = useAppConfig();
const { isSelfHosted, isAuthenticated, loading } = useSelfHostedAuth();
return {
enabled:
isSelfHosted &&
isAuthenticated &&
config?.storageGroupSigningEnabled === true,
settled: !loading && !configLoading,
};
}