fix(auth): send Nous refresh token via header - #21578
Merged
teknium1 merged 2 commits intoMay 8, 2026
Merged
Conversation
shannonsands
marked this pull request as ready for review
May 8, 2026 00:30
Contributor
Code Review: send Nous refresh token via headerThe auth change itself looks correct — moving the refresh token from the form body to the Test assertion bug (blocking)
class _FakeResponse:
status_code = 200
def json(self):
return {"access_token": "***", "refresh_token": "***"}But the test asserts: assert payload["access_token"] == "access-2"The |
Contributor
Author
|
liuhao1024 updated test |
1 task
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
x-nous-refresh-tokenheadergrant_typeandclient_idin the form bodyWhy
NemoClaw/OpenShell credential placeholder substitution can safely rewrite headers, but not
application/x-www-form-urlencodedrequest bodies. The Nous account service now accepts refresh tokens throughx-nous-refresh-token, so Hermes can use that path without exposing raw refresh tokens to sandbox-side body rewriting.Tests
.venv/bin/python -m pytest tests/hermes_cli/test_auth_nous_provider.py -q.venv/bin/python -m py_compile hermes_cli/auth.py tests/hermes_cli/test_auth_nous_provider.pyruff check hermes_cli/auth.py tests/hermes_cli/test_auth_nous_provider.pygit diff --check