diff --git a/access.go b/access.go index 3871b8c..178f0e0 100644 --- a/access.go +++ b/access.go @@ -521,8 +521,8 @@ func (s *Server) FinishAccessRequest(w *Response, r *http.Request, ar *AccessReq if ret.RefreshToken != "" { w.Output["refresh_token"] = ret.RefreshToken } - if ar.Scope != "" { - w.Output["scope"] = ar.Scope + if ret.Scope != "" { + w.Output["scope"] = ret.Scope } } else { w.SetError(E_ACCESS_DENIED, "")