Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to send challenge only if provider supports PKCE #283

Merged
merged 1 commit into from
May 8, 2020
Merged

Conversation

int128
Copy link
Owner

@int128 int128 commented May 7, 2020

This will fix #282.

Verified with GitLab.

% go run main.go setup --oidc-issuer-url=https://gitlab.com --oidc-client-id=REDUCTED
authentication in progress...
error: setup: authentication error: authentication error: authorization code flow error: oauth2 error: could not exchange the code and token: oauth2: cannot fetch token: 401 Unauthorized
Response: {"error":"invalid_request","error_description":"The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed."}
exit status 1
% go run main.go setup --oidc-issuer-url=https://gitlab.com --oidc-client-id=REDUCTED
authentication in progress...

## 2. Verify authentication

You got a token with the following claims:

{
  "iss": "https://gitlab.com",
...

@codecov-io
Copy link

Codecov Report

Merging #283 into master will increase coverage by 2.08%.
The diff coverage is 88.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
+ Coverage   70.31%   72.40%   +2.08%     
==========================================
  Files          20       20              
  Lines         721      714       -7     
==========================================
+ Hits          507      517      +10     
+ Misses        149      130      -19     
- Partials       65       67       +2     
Impacted Files Coverage Δ
pkg/domain/pkce/pkce.go 85.18% <85.18%> (ø)
pkg/usecases/authentication/authcode.go 63.26% <100.00%> (-1.45%) ⬇️
pkg/usecases/authentication/authcode_keyboard.go 71.42% <100.00%> (-0.80%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ffc914...e12ba66. Read the comment docs.

@int128 int128 merged commit 175275b into master May 8, 2020
@int128 int128 deleted the pkce branch May 8, 2020 13:19
@g-psantos g-psantos mentioned this pull request Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't use kubelogin with Gitlab because of the code_verifier parameter
2 participants