fix(sdk): use kind when checking for Studio user (#1411)

This commit is contained in:
David Duong
2025-07-17 03:03:27 +02:00
committed by GitHub
parent 0ab6a65cb3
commit ac7b067a0b
3 changed files with 10 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
---
"@langchain/langgraph-api": patch
"@langchain/langgraph-ui": patch
"@langchain/langgraph-cli": patch
"@langchain/langgraph-sdk": patch
---
fix(sdk): use `kind` when checking for Studio user
+1
View File
@@ -61,6 +61,7 @@ export const handleAuthEvent = async <T extends keyof AuthEventValueMap>(
};
const STUDIO_USER = {
kind: "StudioUser",
display_name: "langgraph-studio-user",
identity: "langgraph-studio-user",
permissions: [],
+1
View File
@@ -49,6 +49,7 @@ export class Auth<
* @returns True if the user is a studio user, false otherwise
*/
export function isStudioUser(user: BaseUser) {
if ("kind" in user && user.kind === "StudioUser") return true;
return user.identity === "langgraph-studio-user";
}