From 2d3ce25e9aad1d581a13ce3135495241291bfb6d Mon Sep 17 00:00:00 2001 From: Burcu Dogan Date: Wed, 12 Nov 2014 10:02:14 +1100 Subject: [PATCH] Don't mutate the authorization endpoint. Flow should be reusable, Options object should not be mutated by the calls performed on the flow. --- oauth2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth2.go b/oauth2.go index 0062f59..ce166b1 100644 --- a/oauth2.go +++ b/oauth2.go @@ -145,7 +145,7 @@ func New(options ...Option) (*Flow, error) { // access token. If set to "force" the user will always be prompted, // and the code can be exchanged for a refresh token. func (f *Flow) AuthCodeURL(state, accessType, prompt string) string { - u := f.opts.AuthURL + u := *f.opts.AuthURL v := url.Values{ "response_type": {"code"}, "client_id": {f.opts.ClientID},