diff options
| author | Claude Sonnet 5 <noreply@anthropic.com> | 2026-10-04 08:41:39 +0000 |
|---|---|---|
| committer | Claude Sonnet 5 <noreply@anthropic.com> | 2026-10-04 08:41:39 +0000 |
| commit | f5af9014450136fbc154a5d1ffe4311e1338367b (patch) | |
| tree | 833a0b6def464bb1c26cea40a40081eb2a9bacf2 | |
| parent | 93beeb6a2af22c179069dbc135b437c7819e942b (diff) | |
| download | gn-auth-f5af9014450136fbc154a5d1ffe4311e1338367b.tar.gz | |
fix(wsgi): hash the dev client's secret before storing it
init-dev-clients stored the dev client's secret ("yadabadaboo") as
plain text, but OAuth2Client.check_client_secret always runs the
stored value through the Argon2 verifier, which raises
InvalidHashError on a non-hash string. Every grant type requiring
client_secret_post -- i.e. all of them -- failed for the dev client as
a result. create-oauth2-client already hashes its secret correctly
via hash_password(); init-dev-clients now does the same.
Reproduced: flask init-dev-clients, then POST /auth/token with the
dev client's credentials raised a 500 (argon2.exceptions.InvalidHashError)
before this change, and returns a token after it.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XDDpXvZBQat9uSgDeEMJ8d
| -rw-r--r-- | gn_auth/wsgi.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gn_auth/wsgi.py b/gn_auth/wsgi.py index b5c4499..6314f2d 100644 --- a/gn_auth/wsgi.py +++ b/gn_auth/wsgi.py @@ -96,7 +96,7 @@ def init_dev_clients(client_uri): """ dev_clients = ({ "client_id": "0bbfca82-d73f-4bd4-a140-5ae7abb4a64d", - "client_secret": "yadabadaboo", + "client_secret": hash_password("yadabadaboo"), "client_id_issued_at": ceil(datetime.now().timestamp()), "client_secret_expires_at": 0, "client_metadata": json.dumps({ |
