pipelines-as-code icon indicating copy to clipboard operation
pipelines-as-code copied to clipboard

Create github token from tkn-pac

Open chmouel opened this issue 3 years ago • 0 comments

We currently send folks to a web browser to create token,

We can definitively do it the same way gh auth does it :

image

it redirect to this page :

https://github.com/login/device

which then it use its internal library authflow :

https://github.com/cli/cli/blob/trunk/internal/authflow/flow.go

to validate it and get the token

we would probably need to create our own here:

https://github.com/cli/cli/blob/trunk/internal/authflow/flow.go#L21-L24

and we can reuse the same logic for Github Enteprise...

chmouel avatar May 13 '22 09:05 chmouel