MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / update_oauth_state

Function update_oauth_state

crates/opencode-mcp/src/auth.rs:160–164  ·  view source on GitHub ↗

Store the OAuth state parameter.

(mcp_name: &str, state: &str)

Source from the content-addressed store, hash-verified

158}
159/// Store the OAuth state parameter.
160pub async fn update_oauth_state(mcp_name: &str, state: &str) -> Result<(), std::io::Error> {
161 let mut entry = get(mcp_name).await.unwrap_or_default();
162 entry.oauth_state = Some(state.to_string());
163 set(mcp_name, entry, None).await
164}
165
166/// Read the stored OAuth state.
167pub async fn get_oauth_state(mcp_name: &str) -> Option<String> {

Callers 1

start_authMethod · 0.85

Calls 2

setFunction · 0.85
getFunction · 0.70

Tested by

no test coverage detected