Skip to content

feat(sketchfab): sign in with OhMyGame's Sketchfab application - #71

Open
xinyang6879 wants to merge 1 commit into
mainfrom
feat/sketchfab-oauth
Open

xinyang6879 wants to merge 1 commit into
mainfrom
feat/sketchfab-oauth

Conversation

@xinyang6879

Copy link
Copy Markdown
Collaborator

What changed

  • plugins/sketchfab/native/index.mjs: sets CLIENT_ID to OhMyGame's Sketchfab OAuth application, so Sign in with Sketchfab is offered by default. Removes the OHMYGAME_SKETCHFAB_CLIENT_ID override.
  • test/sketchfab.test.ts: signed out, Settings now offers sign-in and open-token-page; with an empty client ID, only the token page (the earlier case, kept).
  • plugins/sketchfab/README.md: describes the built-in application instead of "until it is set, the button isn't offered", and drops the env-var step from local acceptance.
  • Version 0.1.0 → 0.1.1 in package.json and plugin.json (0.1.0 is already released).

Why

Sketchfab approved the OAuth application (authorization code, public client with no secret, redirect http://127.0.0.1:52817/sketchfab/callback, matching REDIRECT_PORT/REDIRECT_PATH). A public client's ID isn't a secret, so it ships in the plugin.

The env override never worked: the app's projectProcessEnvironment deletes every OHMYGAME_* variable before starting plugin hosts, so it never reached the plugin.

The API token stays as the fallback for when OAuth can't finish (for example, port 52817 in use).

How it was checked

  • node --test test/sketchfab.test.ts: 7/7 pass.
  • npm test (app linked as app/, Node 22.19): 309/318. The 9 failures (doubao-voice ×7, pixel-sprites search data, official plugins doubao-voice/pixelfx "released as it is") fail identically on unmodified main; none are in sketchfab.
  • npm run typecheck: passes.

Still needed (manual): uninstall the released Sketchfab, add plugins/sketchfab under Plugins › Add plugin › This computer with Develop on, then Sign in with Sketchfab → Allow → status shows the account. Also: add a CC BY model (GLB with author and license), Cancel sign-in, Sign out, and deny on Sketchfab's page.

🤖 Generated with Claude Code

Sketchfab registered OhMyGame's OAuth application (authorization code,
public client, redirect http://127.0.0.1:52817/sketchfab/callback), so the
plugin now carries its client ID and offers Sign in with Sketchfab by
default. The API token stays as the fallback when sign-in can't complete.

The OHMYGAME_SKETCHFAB_CLIENT_ID override is removed: the app strips
OHMYGAME_* variables from plugin hosts, so it never reached the plugin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant