Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[BUG] Missing `code_challenge` in Github OAuth PKCE progress

Closed Beginner friendly
#1,373 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start in src/backend/database/routes/users.ts around lines 804 and 845-861, then review the GitHub OIDC authorization and callback flow. Reproduce the Docker 2.8.0 login failure or inspect the token exchange request, and verify that GitHub login succeeds without the missing code_verifier error.

Written by the indexing model from the issue text.

Description

auth bug good-first-issue platform-docker platform-web
Title

Github OIDC failed. Missing code_challenge

Platform

Website - Firefox

Server Installation Method

Docker

Version

2.8.0

CLI Installation Method

None

CLI Version

No response

Troubleshooting
  • I have examined logs and tried to find the issue
  • I have reviewed opened and closed issues
  • I have tried restarting the application
  • I have checked open issues and ensured this is not a duplicate
The Problem

I configured the Github for OIDC following https://docs.termix.site/features/authentication/github-google/

But when i tried to login with Github, it redirected to /users/oidc/callback but returned {"error":"Failed to exchange authorization code"}.

Logs:

[4:09:24 PM] [ERROR] [🔐] GitHub token exchange failed
{
  operation: 'github_token_exchange_failed',
  status: 400,
  errorResponse: '{"error":"invalid_grant","error_description":"A code_verifier was not included, but the authorization request included a code_challenge. Codes requested with a code_challenge MUST be redeemed with a code_verifier.","error_uri":"https://docs.github.com/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app"}'
}
[4:10:24 PM] [ERROR] [🔐] GitHub token exchange failed
{
  operation: 'github_token_exchange_failed',
  status: 400,
  errorResponse: '{"error":"invalid_grant","error_description":"A code_verifier was not included, but the authorization request included a code_challenge. Codes requested with a code_challenge MUST be redeemed with a code_verifier.","error_uri":"https://docs.github.com/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-user-access-token-for-a-github-app"}'
}

Troubleshooting:

The authorize request carries code_challenge which needs code_verifier as presented in Github Docs

Request Screenshot

Related codes:

https://github.com/Termix-SSH/Termix/blob/49fa4880931d284ec4132b7c6c6ab5e8ca0fdad5/src/backend/database/routes/users.ts#L845-L861

The following patch works:

diff --git a/src/backend/database/routes/users.ts b/src/backend/database/routes/users.ts
--- a/src/backend/database/routes/users.ts
+++ b/src/backend/database/routes/users.ts
@@ -804,6 +804,7 @@
           client_secret: config.client_secret,
           code: code,
           redirect_uri: backendCallbackUri,
+          ...(storedCodeVerifier ? { code_verifier: storedCodeVerifier } : {}),
         }),
         ...fetchOptions,
       });
How to Reproduce
  1. Pull docker 2.8.0
  2. Configure Github as OIDC provider
  3. Login with Github
Additional Context

No response

Dominant language
No language data
Stars
30
Forks
4
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Termix-SSH/Support

All issues in Termix-SSH/Support

Similar issues

More Security issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.