Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions packages/opencode/test/mcp/oauth-auto-connect.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,24 @@ const config = (name: string) => ({
},
})

mcpTest.instance(
"clientMetadata includes configured OAuth scope",
() =>
Effect.gen(function* () {
const auth = yield* McpAuth.Service
const provider = new McpOAuthProvider(
"test-scope",
"https://example.com/mcp",
{ scope: "openid email profile" },
{ onRedirect: async () => {} },
auth,
)

expect(provider.clientMetadata.scope).toBe("openid email profile")
}),
{ config: config("test-scope") },
)

mcpTest.instance(
"first connect to OAuth server shows needs_auth instead of failed",
() =>
Expand Down
Loading