feat: oauth tokens stored in aws secrets / parameters or mongodb #10168
+3,150
−62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Template
Summary
The change implements an interface to store oauth tokens / refresh_tokens in aws secrets or aws parameters ( free! ) instead of the mongodb database.
It's a proposal for:
#9864
Imagine you have a mcp server like "google_workspace_mcp" on your instance, the refresh_tokens ( ie: permanent, never expiring passwords-like ) for all the critical google workspace feature for all of your user will be stored in the database. If, for some reason you're not at ease with that this PR allows to store in aws secret or aws parameters instead, where you can manage access / audit etc.
Change Type
Please delete any irrelevant options.
Testing
The librechat backend must have access to the storage ( aws secrets or aws parameters ) you choose, there are various ways for this.
Then, when you use an MCP server with oauth, verify the tokens are stocked on the cloud storage instead of the database.
Test Configuration:
Checklist
Please delete any irrelevant options.
At this time this PR is a draft but it's fully functional