func Example() {
	clientID := os.Getenv("OAUTH_CLIENT_ID")
	clientSecret := os.Getenv("OAUTH_CLIENT_SECRET")
	flow, err := InitFlow()
	if err != nil {
		panic(err)
	}
	params := BrowserParams{
		ClientID:    clientID,
		RedirectURI: "http://127.0.0.1/callback",
		Scopes:      []string{"repo", "read:org"},
		AllowSignup: true,
	}
	browserURL, err := flow.BrowserURL("https://github.com/login/oauth/authorize", params)
	if err != nil {
		panic(err)
	}
	go func() {
		_ = flow.StartServer(nil)
	}()
	err = browser.OpenURL(browserURL)
	if err != nil {
		panic(err)
	}
	httpClient := http.DefaultClient
	accessToken, err := flow.AccessToken(httpClient, "https://github.com/login/oauth/access_token", clientSecret)
	if err != nil {
		panic(err)
	}
	fmt.Printf("Access token: %s\n", accessToken.Token)
}
This demonstrates how to perform OAuth App Authorization Flow for GitHub.com.
Ensure that the OAuth app on GitHub lists the callback URL: "http://127.0.0.1/callback"
package webapp
import (
	"fmt"
	"net/http"
	"os"
	"github.com/cli/browser"
)