Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(credentials): accept legacy `user_id` field in auth schemas

Steven Enamakel6aa3a536c24f
diff --git a/crates/openhuman-core/src/security/credentials/schemas.rs b/crates/openhuman-core/src/security/credentials/schemas.rs
index 5553d63749..9d56c1cae2 100644
--- a/crates/openhuman-core/src/security/credentials/schemas.rs
+++ b/crates/openhuman-core/src/security/credentials/schemas.rs
@@ -176,6 +176,9 @@ pub fn schemas(function: &str) -> ControllerSchema {
"Backend user id. Optional when `user` carries one or the JWT has a \
subject claim.",
),
+ // Accepted spelling for callers that still send the historical
+ // `auth_store_session` shape through the legacy alias.
+ optional_string("user_id", "Alias of `userId`."),
optional_json(
"user",
"User payload (the host's /auth/me answer, or the local user).",
diff --git a/tests/config_auth_app_state_connectivity_e2e.rs b/tests/config_auth_app_state_connectivity_e2e.rs
index 26f8b674cc..93e4413733 100644
--- a/tests/config_auth_app_state_connectivity_e2e.rs
+++ b/tests/config_auth_app_state_connectivity_e2e.rs
@@ -2563,23 +2563,31 @@ async fn worker_a_controller_schemas_are_fully_exposed() {
(
"auth",
vec![
- "openhuman.auth_clear_api_key",
- "openhuman.auth_clear_session",
- "openhuman.auth_consume_login_token",
+ "openhuman.auth_clear_credential",
+
"openhuman.auth_create_channel_link_token",
- "openhuman.auth_get_me",
+
"openhuman.auth_get_session_token",
+
"openhuman.auth_get_state",
+
"openhuman.auth_list_provider_credentials",
+
"openhuman.auth_oauth_connect",
+
"openhuman.auth_oauth_fetch_client_key",
+
"openhuman.auth_oauth_fetch_integration_tokens",
+
"openhuman.auth_oauth_list_integrations",
+
"openhuman.auth_oauth_revoke_integration",
+
"openhuman.auth_remove_provider_credentials",
- "openhuman.auth_store_api_key",
+
+ "openhuman.auth_set_credential",
+
"openhuman.auth_store_provider_credentials",
- "openhuman.auth_store_session",
],
),
(