Skip to content

How to use a shared CLI with per-request token #885

@yuqizhou77

Description

@yuqizhou77

I am evaluating if we could use copilot-sdk in our web application to support multiple user scenarios with their own GitHub account and I found this https://github.com/github/copilot-sdk/blob/main/docs/setup/github-oauth.md#shared-cli-with-per-request-tokens. However looking on the current code, I kind of doubt if this is true. Looking at

        if (options.cliUrl && (options.githubToken || options.useLoggedInUser !== undefined)) {
            throw new Error(
                "githubToken and useLoggedInUser cannot be used with cliUrl (external server manages its own auth)"
            );
        }

in

if (options.cliUrl && (options.githubToken || options.useLoggedInUser !== undefined)) {
github token cannot be set if using a shared CLI. And there seems no config to pass token when create session.

Is this some feature in plan or doc being incorrect?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions