fix: example client should track state, call cli.CodeFlow need context

This commit is contained in:
wener 2021-10-08 00:15:38 +08:00
parent a63fbee93d
commit 0de2cc1d24
2 changed files with 5 additions and 4 deletions

View file

@ -43,7 +43,7 @@ func main() {
state := func() string {
return uuid.New().String()
}
token := cli.CodeFlow(relyingParty, callbackPath, port, state)
token := cli.CodeFlow(ctx, relyingParty, callbackPath, port, state)
client := github.NewClient(relyingParty.OAuthConfig().Client(ctx, token.Token))