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

[server] fix for wrong token selected if multiple #8093

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Conversation

AlexTugarev
Copy link
Member

@AlexTugarev AlexTugarev commented Feb 8, 2022

This is a followup to #7837 and fixes incorrect order of tokens. The intention was to select the latest token.

Fix wrong token selection if multiple found for a profile.

@AlexTugarev AlexTugarev requested a review from a team February 8, 2022 14:02
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Feb 8, 2022
Copy link
Member

@geropl geropl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AlexTugarev Thx for fixing this!

Copy link
Contributor

@jankeromnes jankeromnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 👍

Tested like this in a browser console:

['2022-01-01','2022-02-01','2022-01-20'].sort((a, b) => `${a}`.localeCompare(`${b}`)).reverse()[0]
"2022-02-01"

@codecov
Copy link

codecov bot commented Feb 8, 2022

Codecov Report

Merging #8093 (a4d6edf) into main (ac0afcf) will decrease coverage by 1.15%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8093      +/-   ##
==========================================
- Coverage   12.01%   10.86%   -1.16%     
==========================================
  Files          20       18       -2     
  Lines        1190     1022     -168     
==========================================
- Hits          143      111      -32     
+ Misses       1043      909     -134     
+ Partials        4        2       -2     
Flag Coverage Δ
components-gitpod-cli-app 10.86% <ø> (ø)
components-local-app-app-darwin-amd64 ?
components-local-app-app-darwin-arm64 ?
components-local-app-app-linux-amd64 ?
components-local-app-app-linux-arm64 ?
components-local-app-app-windows-386 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
components/local-app/pkg/auth/auth.go
components/local-app/pkg/auth/pkce.go

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 ac0afcf...a4d6edf. Read the comment docs.

@roboquat roboquat merged commit e9cd644 into main Feb 8, 2022
@roboquat roboquat deleted the at/followup-7837 branch February 8, 2022 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note size/XS team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants