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
460 stars 63 forks source link

Add support for custom strings in Device Flow #25

Closed alfredovaldes closed 1 year ago

alfredovaldes commented 2 years ago

On the device flow, add support to specify the message to be shown to the user.

On oauth_device.go, currently the messages are: fmt.Fprintf(stdout, "First, copy your one-time code: %s\n", code.UserCode) fmt.Fprint(stdout, "Then press [Enter] to continue in the web browser... ")

mislav commented 1 year ago

Hi, if you need custom strings, then just copy the implementation of func DeviceFlow() into your app and change any details that you like! That function was just meant to be a reference implementation anyway.