cli / oauth

A library for performing OAuth Device flow and Web application flow in Go client apps.
https://pkg.go.dev/github.com/cli/oauth
MIT License
466 stars 65 forks source link

Can I create an access token with SSO enabled? #5

Closed mfcollins3 closed 3 years ago

mfcollins3 commented 3 years ago

I'm trying to create a CLI tool for internal use at my company that can access an internal repository in our GitHub Enterprise Cloud organization (we have SSO enabled). I can use this library to successfully create an access token for my account, but I can't use the access token to access my repository. Is it possible to request that the access token have SSO enabled programmatically so that I can use it to hit an internal repository, or would I be better off just asking my users to provide a personal access token with SSO already enabled?

mislav commented 3 years ago

@mfcollins3 While the user is authorizing your OAuth app in their web browser, there should be offered a list of user's organizations that require SSO that the user can additionally authorize the token for. Does that not appear for users of your app?

mfcollins3 commented 3 years ago

Looks like it was my error. Thanks for the response.