Repository navigation
feat: allow Raycast's OAuth redirect for device sign-in - #1007
Open
chrismessina wants to merge 2 commits into
Open
chrismessina wants to merge 2 commits into
chrismessina wants to merge 2 commits into
Conversation
Add raycast://oauth?package_name=Extension, the redirect Raycast's OAuth.PKCEClient uses (RedirectMethod.App), to the authorize page's allowed redirect prefixes, so the /dev/null Raycast extension can approve its SSH key as a device the way the app does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrismessina
marked this pull request as ready for review
October 22, 2026 23:17
Contributor
|
@chrismessina, #585 also proposes a device code sign-in (RFC 8628), which needs no redirect at all. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The /dev/null Raycast extension posts commits through the CLI endpoint, signed with the user's GitHub SSH key. To show feeds, follow people, star commits and open Remotes, it needs the v1 API, which only accepts a key approved as a device through
/mobile/authorize. That page only redirects todevnull://, so the code can't get back to Raycast.This adds Raycast's OAuth redirect,
raycast://oauth?package_name=Extension, to the allowed prefixes. It's the redirect Raycast's own OAuth client uses (OAuth.PKCEClientwithRedirectMethod.App). The extension can then sign in the way the app does: it sends its SSH key's fingerprint, a device name and a PKCE challenge, the user approves on the web, and it redeems the code withPOST /api/v1/devices, signed by that key.Changes
config/mobile.php: one more entry inredirect_uri_prefixes.MobileAuthorizationControllerTest: a test that approving redirects to the Raycast URL with the code and state added after its existing query. Three expected validation messages are updated, since they list the allowed prefixes.A code is bound to the key's fingerprint and the PKCE challenge, and redeeming it takes a signature from that key and the verifier, so an app that intercepts the
raycast://callback can't use the code.package_name=Extensionis Raycast's fixed placeholder, not the extension's identity; the approval page shows the device name the extension sends.Validation
Local, on macOS with PHP 8.5.12 and PostgreSQL 18 with pgvector 0.8.7:
vendor/bin/pest --parallel: 3,971 passed on this revision.tests/Feature/Controllers/MobileAuthorizationControllerTest.php: 20 passed. With the config line reverted, 4 fail: the new test and the three message tests.pint --testandrector --dry-runon the two changed files: clean.phpstan: no errors.Independent review
Codex reviewed
877532e..736ebfefrom source: CODE: PASS. Two non-blocking notes, not changed here:devnull://, this is a prefix match, so it also accepts longer URLs that start with the Raycast one. They still need the key and the verifier.Source review only: no browser check and no end-to-end Raycast sign-in.
Limitations