Skip to content

Prompt for workspace during OAuth login#92

Merged
Mukil Loganathan (langchain-infra) merged 1 commit into
mainfrom
mukil/login-workspace-selection
May 1, 2026
Merged

Prompt for workspace during OAuth login#92
Mukil Loganathan (langchain-infra) merged 1 commit into
mainfrom
mukil/login-workspace-selection

Conversation

@langchain-infra
Copy link
Copy Markdown
Contributor

Summary

  • list available workspaces after langsmith login completes OAuth and prompt for a default workspace in interactive terminals
  • allow non-interactive login to complete without a workspace, but print a warning with --workspace-id / workspace set-default guidance
  • format LangSmith JSON error responses so workspace-required auth errors show the server error code and message

Commands and observed output

  • langsmith login --api-url https://api.smith.langchain.com --no-browser --timeout 10m
    • opened https://smith.langchain.com/activate and displayed a device code
    • after authorization, printed Select a default workspace: with numbered workspace options
    • selecting 1 saved workspace_id: ebbaf2eb-769b-4505-aca2-d11de10372a4 for LangChain Inc
  • langsmith project list --limit 1 using the saved temp profile returned a project from the selected workspace
  • langsmith workspace list --format pretty using the saved temp profile returned the workspace table

Tests

  • go test ./internal/cmd -run TestLogin -count=1
  • go test ./internal/client -run TestRawGet_JSONHTTPErrorIncludesMessage -count=1
  • go test ./... -count=1

@langchain-infra Mukil Loganathan (langchain-infra) merged commit d1f1427 into main May 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants