pomerium/internal/mcp
Denis Mishin f6ddb8878d
mcp: if upstream oauth does not return a refresh token, keep previous (#5738)
## Summary

Upstream OAuth2 providers may not return the refresh token at every
access token renewal request,
this PR ensures we do not accidentally overwrite the refresh token at
hand with an empty string.

## Related issues

Fix
https://linear.app/pomerium/issue/ENG-2619/mcp-upstream-oauth2-google-drive-did-not-return-refresh-token

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [ ] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [ ] ready for review
2025-07-21 21:10:32 -04:00
..
cipher.go mcp: authorize request (pt2) (#5586) 2025-04-24 12:11:19 -07:00
code.go mcp: extend code usage (#5588) 2025-04-25 14:47:11 -04:00
code_test.go mcp: extend code usage (#5588) 2025-04-25 14:47:11 -04:00
handler.go mcp: delete upstream oauth2 token (#5707) 2025-07-08 12:46:45 -04:00
handler_authorization.go mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
handler_connect.go mcp: delete upstream oauth2 token (#5707) 2025-07-08 12:46:45 -04:00
handler_list_routes.go mcp: delete upstream oauth2 token (#5707) 2025-07-08 12:46:45 -04:00
handler_metadata.go mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
handler_oauth_callback.go mcp: implement connect (#5640) 2025-06-02 17:19:34 -04:00
handler_register_client.go mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
handler_token.go mcp: client registration/token fixes (#5649) 2025-06-11 11:28:24 -04:00
host_info.go mcp: add server.path convenience option (#5726) 2025-07-17 11:18:55 -04:00
host_info_test.go mcp: add server.path convenience option (#5726) 2025-07-17 11:18:55 -04:00
storage.go mcp: delete upstream oauth2 token (#5707) 2025-07-08 12:46:45 -04:00
storage_test.go mcp: delete upstream oauth2 token (#5707) 2025-07-08 12:46:45 -04:00
token.go mcp: if upstream oauth does not return a refresh token, keep previous (#5738) 2025-07-21 21:10:32 -04:00