Skip to content

Commit 83f7e96

Browse files
examples: fix OAuth client example after latest changes. (#820)
1 parent c9317fb commit 83f7e96

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

examples/auth/client/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func (r *codeReceiver) serveRedirectHandler(listener net.Listener) {
5353
}
5454

5555
func (r *codeReceiver) getAuthorizationCode(ctx context.Context, args *auth.AuthorizationArgs) (*auth.AuthorizationResult, error) {
56+
fmt.Printf("Please open the following URL in your browser: %s\n", args.URL)
5657
select {
5758
case authRes := <-r.authChan:
5859
return authRes, nil
@@ -87,8 +88,10 @@ func main() {
8788
AuthorizationCodeFetcher: receiver.getAuthorizationCode,
8889
// Uncomment the client configuration you want to use.
8990
// PreregisteredClientConfig: &auth.PreregisteredClientConfig{
90-
// ClientID: "",
91-
// ClientSecret: "",
91+
// ClientSecretAuthConfig: &auth.ClientSecretAuthConfig{
92+
// ClientID: "",
93+
// ClientSecret: "",
94+
// },
9295
// },
9396
// DynamicClientRegistrationConfig: &auth.DynamicClientRegistrationConfig{
9497
// Metadata: &oauthex.ClientRegistrationMetadata{

0 commit comments

Comments
 (0)