Open source CapCut alternative.
TypeScript
feat(app): give the dev build its own donkey-dev:// callback scheme
David Lef385452582fa
diff --git a/docs/guides/install-donkey.md b/docs/guides/install-donkey.mdindex 23adcfbc..c0c7a8f7 100644--- a/docs/guides/install-donkey.md+++ b/docs/guides/install-donkey.md@@ -116,10 +116,12 @@ packages, or local model repair steps in the hosted-model install path.The dev script starts the local site when `DONKEY_WEB_BASE_URL` points atlocalhost, builds Donkey, wraps the debug executable in`apps/Donkey/.build/debug/Donkey Dev.app`, registers that bundle for-`donkey://auth/callback`, and launches it. The debug wrapper uses the-`Donkey Dev` display name and `com.donkeyuse.Donkey.dev` bundle identifier by-default so macOS privacy settings do not collide with packaged `Donkey.app`-builds. Development builds use the same hosted-model boundary as packaged+`donkey-dev://auth/callback`, and launches it. The debug wrapper defaults to the+`Donkey Dev` display name, the `com.donkeyuse.Donkey.dev` bundle identifier, and+a `donkey-dev://` sign-in callback scheme, so it never collides with a packaged+`Donkey.app` (which keeps `donkey://`) over macOS privacy settings or the OAuth+callback handoff. The site derives the matching scheme automatically under+`next dev`, so its site→app handoff deep-links back to this build. Development builds use the same hosted-model boundary as packagedbuilds; to test provider behavior, configure the site/backend environment andkeep provider credentials out of the Mac app.diff --git a/scripts/run-donkey-dev.sh b/scripts/run-donkey-dev.shindex a6389254..ed5283d2 100755--- a/scripts/run-donkey-dev.sh+++ b/scripts/run-donkey-dev.sh@@ -20,7 +20,7 @@ RESOURCES_DIR="$CONTENTS_DIR/Resources"FRAMEWORKS_DIR="$CONTENTS_DIR/Frameworks"APP_ICON_SOURCE="$APP_DIR/Sources/Donkey/Resources/Donkey.icns"APP_ICONSET_SOURCE="$APP_DIR/Sources/Donkey/Resources/Donkey.iconset"-AUTH_CALLBACK_SCHEME="${DONKEY_AUTH_CALLBACK_SCHEME:-donkey}"+AUTH_CALLBACK_SCHEME="${DONKEY_AUTH_CALLBACK_SCHEME:-donkey-dev}"LAUNCH_APP="${DONKEY_LAUNCH_APP:-1}"LSREGISTER="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister"SITE_PID=""@@ -29,6 +29,14 @@ LOG_PID=""export DONKEY_WEB_BASE_URL="${DONKEY_WEB_BASE_URL:-http://localhost:3000}"+# The dev build registers its own auth callback scheme (AUTH_CALLBACK_SCHEME,+# baked into the dev Info.plist below) so the website's site->app handoff+# deep-links to THIS build (donkey-dev://) instead of colliding with an installed+# release that owns donkey://. The site derives the matching scheme automatically+# from NODE_ENV (next dev -> donkey-dev), so no site env var is needed here.+# Google OAuth is unaffected: its redirect_uri is the website's own callback+# (BETTER_AUTH_URL host), which never sees this scheme.+# The app authenticates hosted inference with a real signed-in session: launch# it, sign in through Google, and the native session cookie carries the auth.# Dev auth bypass is intentionally NOT enabled here. It exists only for scripts