fix: support local workshop authentication

This commit is contained in:
Thomas Camlong committed 2026-07-14 01:21:53 +02:00
1 parent c72e4d6dfe
commit 55ba12473c
13 files changed
+42 -6

No files matched your search

+12
View File
@@ -109,6 +109,18 @@ export class WorkshopClient {
}
async signInWithGitHub() {
let methods: Awaited<ReturnType<ReturnType<PocketBase["collection"]>["listAuthMethods"]>>;
try {
methods = await this.pocketBase.collection("users").listAuthMethods();
} catch (error) {
throw asWorkshopError(error, "Failed to load Workshop authentication methods");
}
if (!methods.oauth2.providers.some((provider) => provider.name === "github")) {
throw new WorkshopError(
"unavailable",
"GitHub login is not configured. Set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET, then restart Workshop.",
);
}
try {
await this.pocketBase.collection("users").authWithOAuth2({ provider: "github" });
return this.currentUser;
+1 -1
View File
@@ -1,7 +1,7 @@
import { customWidgetImportSchema } from "@homarr/validation/custom-widget";
import { z } from "zod";
export const WORKSHOP_API_URL = "https://store.homarr.dev";
export const WORKSHOP_API_URL = "https://workshop.homarr.dev";
export const WORKSHOP_WEB_URL = "https://homarr.dev/workshop";
export const WIDGET_SCHEMA_VERSION = "homarr-custom-widget-v2";
export const CSS_SCHEMA_VERSION = "homarr-custom-css-v1";