forked from mystiq/dex
server: add scope to newLoginURLFromSession
need to make sure the scope is present otherwise will be considered an invalid request fixes #135
This commit is contained in:
parent
728b64c3cf
commit
7d0ecf9532
1 changed files with 3 additions and 0 deletions
|
@ -296,6 +296,9 @@ func newLoginURLFromSession(issuer url.URL, ses *session.Session, register bool,
|
||||||
if msgCode != "" {
|
if msgCode != "" {
|
||||||
v.Set("msg_code", msgCode)
|
v.Set("msg_code", msgCode)
|
||||||
}
|
}
|
||||||
|
if len(ses.Scope) > 0 {
|
||||||
|
v.Set("scope", strings.Join(ses.Scope, " "))
|
||||||
|
}
|
||||||
|
|
||||||
loginURL.RawQuery = v.Encode()
|
loginURL.RawQuery = v.Encode()
|
||||||
return &loginURL
|
return &loginURL
|
||||||
|
|
Loading…
Reference in a new issue