Skip to content

Support access token authorisation for remote filesΒ #5239

@kitsonk

Description

@kitsonk

Currently there is no way to fetch remote modules from private GitHub repositories without exposing your access token.

For example you could do the following currently:

import * as foo from "https://$TOKEN@raw.githubusercontent.com/private_org/private_repo/master/foo.ts";

But you could easily "leak" your access token if you then checked that code in and pushed it to a public repo.

GitHub (and I assume other services) all the token to be passed as an authorisation header:

Authorization: token $TOKEN

If this was somehow passed on the command line, it would become easier to secure.

Metadata

Metadata

Assignees

Labels

clirelated to cli/ dirfeatnew feature (which has been agreed to/accepted)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions