different-ai/openwork · warning
extensions.add_sign_in_required
extensions.add_sign_in_required
Error message
extensions.add_sign_in_required
What it means
Publishing a library item to an organization requires Den authentication: readDenSettings() must yield both an authToken and an activeOrgId. If either is missing/blank, createLibraryItem throws the localized t('extensions.add_sign_in_required') before creating the Den client.
Source
Thrown at apps/app/src/react-app/domains/settings/state/extensions-store.ts:2268
throw new Error(t("extensions.add_mcp_url_required"));
}
} else if (kind !== "plugin") {
if (!description) {
throw new Error(t("extensions.add_description_required"));
}
if (!instructions) {
throw new Error(t("extensions.add_instructions_required"));
}
}
if (kind === "plugin" && drafts.length === 0) {
throw new Error(t("extensions.add_plugin_component_required"));
}
const settings = readDenSettings();
const token = settings.authToken?.trim() ?? "";
const orgId = settings.activeOrgId?.trim() ?? "";
if (!token || !orgId) {
throw new Error(t("extensions.add_sign_in_required"));
}
const client = createDenClient({
baseUrl: settings.baseUrl,
token,
});
const body = denLibraryPluginCreateRequest(kind, {
...input,
components: kind === "plugin" ? drafts : input.components,
});
try {
await client.setActiveOrganization({ organizationId: orgId });
const pluginId = await client.createOrgPlugin(orgId, body);
await waitForListedLibraryPlugin(
() => client.listMeLibraryPlugins(orgId),
pluginId,
);
clearCloudInventoryCache();
return pluginId;View on GitHub (pinned to 2b7df46e8a)
Solutions
- Sign in to Den (Account → Sign in) so settings.authToken is populated, then retry.
- Select an active organization in settings so activeOrgId is set.
- Persist/refresh Den settings before opening the publish flow; gate the submit button on token && orgId being present.
- Handle 401 follow-ups separately — this specific error means credentials were absent, not rejected.
Example fix
// before
await createLibraryItem('skill', input); // throws when signed out
// after
const settings = readDenSettings();
if (!settings.authToken?.trim() || !settings.activeOrgId?.trim()) {
openSignInDialog();
return;
}
await createLibraryItem('skill', input); Defensive patterns
Strategy: validation
Validate before calling
const settings = readDenSettings();
if (!settings.authToken?.trim() || !settings.activeOrgId?.trim()) {
openSignInDialog(); return;
} Type guard
function isDenAuthenticated(s: { authToken?: string | null; activeOrgId?: string | null }): boolean {
return !!s.authToken?.trim() && !!s.activeOrgId?.trim();
} Try / catch
try {
await createLibraryItem(kind, input);
} catch (e) {
if (e instanceof Error && e.message === t('extensions.add_sign_in_required')) {
openSignInDialog();
} else throw e;
} Prevention
- Gate publish actions on Den auth state in the UI
- Refresh the token before opening the publish dialog
- Require active org selection as part of onboarding
- Distinguish missing-credentials from 401 (extensions.add_unauthorized) when handling failures
When it happens
Trigger: Calling createLibraryItem after all field validations pass while the user is signed out of Den, or signed in but with no active organization selected (settings.authToken or settings.activeOrgId empty).
Common situations: Token expired and cleared from settings but the UI still allows the add dialog; fresh install where the user never signed into Den; org selection lost after settings reset or workspace switch.
Related errors
- Failed to sign in to OpenWork Cloud.
- Sign in to OpenWork Cloud and choose an organization first.
- Sign in to OpenWork Cloud, then try reconnecting again.
- Sign in to your Den portal to install OpenWork.
- desktop_signup_deprecated
AI-assisted analysis of different-ai/openwork@2b7df46e8a (2026-09-01).
Data as JSON: /api/errors/3df6f2bfdc15d577.
Report an issue: GitHub.