fix: improve example & fix userinfo marshal (#132)
* fix: example client should track state, call cli.CodeFlow need context * fix: oidc userinfo can UnmarshalJSON with address * rp Discover use client.Discover * add instruction for example to README.md
This commit is contained in:
parent
a63fbee93d
commit
ff2c164057
6 changed files with 48 additions and 7 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue