Replies: 1 comment 1 reply
-
|
Great question, @thomasa88! The SDK provides a couple of ways to persist credentials so you don't need to re-auth every time. Quick & simple —
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Discussion Topic
I have used the OAuth Client example to get an MCP client running. (I had to have
localhostinstead of127.0.0.1in the callback URL for the server to be happy.)https://github.com/modelcontextprotocol/rust-sdk/blob/main/examples/clients/src/auth/oauth_client.rs
Now I want to store the credentials, so I don't need to re-auth every time I run the program. What credentials should I store?
I first looked at AuthorizationManager, but then I went for OAuthState::get_credentials() and OAuthState::set_credentials(). Would the credentials from OAuthState be the correct credentials to store or should I store something from a higher level?
Beta Was this translation helpful? Give feedback.
All reactions