Use a random state
This commit is contained in:
parent
fab53a1b4d
commit
59d60fcfab
|
@ -9,6 +9,7 @@ import (
|
|||
"net/http"
|
||||
"net/url"
|
||||
|
||||
"github.com/pstuifzand/ekster/pkg/util"
|
||||
"willnorris.com/go/microformats"
|
||||
)
|
||||
|
||||
|
@ -70,7 +71,7 @@ func Authorize(me *url.URL, endpoints Endpoints, clientID, scope string) (TokenR
|
|||
|
||||
local := ln.Addr().String()
|
||||
redirectURI := fmt.Sprintf("http://%s/", local)
|
||||
state := "12345344"
|
||||
state := util.RandStringBytes(16)
|
||||
|
||||
q := authURL.Query()
|
||||
q.Add("response_type", "code")
|
||||
|
|
Loading…
Reference in New Issue
Block a user