You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a system that refreshes expired api keys backed by oauth2 if a refresh token is available.
However, in the case when the api key is expired but the oauth2 access token isn’t, the refresh logic is not triggered, and the api key ExpiresAt field is not updated.
Detail: fmt.Sprintf("API key expired at %q.", key.ExpiresAt.String()),
})
}
Relevant Log Output
Expected Behavior
I'd expect the ExpiresAt field to be updated when a valid OAuth2 access token is available.
Steps to Reproduce
The way I triggered it is I manually updated the ExpiresAt field on an api key to the current time via a SQL query and then refreshed the Coder web UI.
Environment
Host OS: Linux
Coder version: 2.20.2
Additional Context
No response
The text was updated successfully, but these errors were encountered:
✅ Workspace has been successfully started! You can access it here.
matifali
added
s2
Broken use cases or features (with a workaround). Only humans may set this.
and removed
needs-triage
Issue that require triage
labels
May 7, 2025
Is there an existing issue for this?
Current Behavior
We have a system that refreshes expired api keys backed by oauth2 if a refresh token is available.
However, in the case when the api key is expired but the oauth2 access token isn’t, the refresh logic is not triggered, and the api key
ExpiresAt
field is not updated.Relavant check:
coder/coderd/httpmw/apikey.go
Line 261 in bbe7dac
Early exit if
ExpiresAt
is not updated.coder/coderd/httpmw/apikey.go
Lines 319 to 324 in bbe7dac
Relevant Log Output
Expected Behavior
I'd expect the
ExpiresAt
field to be updated when a valid OAuth2 access token is available.Steps to Reproduce
The way I triggered it is I manually updated the
ExpiresAt
field on an api key to the current time via a SQL query and then refreshed the Coder web UI.Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: