argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.91k stars 5.46k forks source link

ArgoCD CLI refresh-token does not regenerate new access token when it expire. #19051

Open GeorgiDimv opened 4 months ago

GeorgiDimv commented 4 months ago

Checklist:

Describe the bug

ArgoCD cli returns following error after access token expire, and refresh token does not regenerate new one:

FATA[0001] oauth2: "invalid_grant" "Refresh token is invalid or expired."

To Reproduce

Configure OIDC for ArgoCD

create ArgoCD config file or use the default, default is in "~/.argocd/config". It should look like:

contexts:
- name: <ARGOCD_SERVER_URL>
  server: <ARGOCD_SERVER_URL>
  user: <ARGOCD_SERVER_URL>
current-context: <ARGOCD_SERVER_URL>
servers:
- grpc-web-root-path: ""
  server: <ARGOCD_SERVER_URL>
users:
- auth-token: <ID_TOKEN_FROM_CURL>
  name: <ARGOCD_SERVER_URL>
  refresh-token: <REFRESH_TOKEN_FROM_CURL>

argocd --config ~/PATH/TO/CONFIG app list

Expected behavior

To list apps

Version v2.10.9

nueavv commented 3 months ago

Hi @GeorgiDimv what is your argocd cli version and server version? also give more information on how to reproduce the issue?

GeorgiDimv commented 3 months ago

argocd version --client Output is 2.10.9

to reproduce please check above:

config OIDC

logging via sso

create ArgoCD config file or use the default, default is in "~/.argocd/config".

run : argocd --config ~/.argocd/config app list

andrii-korotkov-verkada commented 2 days ago

ArgoCD versions 2.10 and below have reached EOL. Can you upgrade and let us know if the issue is still present, please?