feat(auth): add xAI OAuth support#28183
Closed
aravhawk wants to merge 2 commits into
Closed
Conversation
Collaborator
|
we are going to work w/ xai team for this so that it's by the book, won't accept contributions from people other than them directly unfortunately. Thanks for the PR tho, but like I said we were asked not to merge these. |
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.
Issue for this PR
N/A
Type of change
What does this PR do?
This adds xAI OAuth so people with a SuperGrok subscription can connect the xai provider without digging up an API key.
It works like the Hermes/OpenClaw flow:
127.0.0.1:56121, falling back to a random ephemeral port if that one's takenauto-codeauth mode that handles both browser redirect and pasted authorization codesThe
auto-codething exists because xAI's browser page doesn't always manage to hit the local callback. When that happens it shows a copy-code fallback page. Rather than exposing two separate auth methods, this one handles both paths.How did you verify your code works?
Ran through the full xAI OAuth flow locally.
Type checks passed across:
packages/opencodepackages/apppackages/pluginpackages/sdk/jsAlso passed the pre-push
bun turbo typecheckhook.Screenshots / recordings
None.
Checklist