diff options
author | r <r@freesoftwareextremist.com> | 2023-10-07 09:19:56 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2023-10-07 09:19:56 +0000 |
commit | c7f40c1e1568bf3f0fcb15c0fc0d01f0f253675d (patch) | |
tree | 61f3a1a1976ac9c36bd811678290452917a666bf | |
parent | d297eb565814e1ab3d350b9eefc35a219fb51a88 (diff) | |
download | bloat-c7f40c1e1568bf3f0fcb15c0fc0d01f0f253675d.tar.gz bloat-c7f40c1e1568bf3f0fcb15c0fc0d01f0f253675d.zip |
Cleanup oauth redirect URL generation
-rw-r--r-- | service/service.go | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/service/service.go b/service/service.go index 6b8d0ee..ca80a2b 100644 --- a/service/service.go +++ b/service/service.go @@ -859,6 +859,7 @@ func (s *service) NewSession(c *client, instance string) (rurl string, sess *mod if err != nil { return } + rurl = app.AuthURI sess = &model.Session{ ID: sid, Instance: instance, @@ -867,20 +868,6 @@ func (s *service) NewSession(c *client, instance string) (rurl string, sess *mod CSRFToken: csrf, Settings: *model.NewSettings(), } - - u, err := url.Parse("/oauth/authorize") - if err != nil { - return - } - - q := make(url.Values) - q.Set("scope", "read write follow") - q.Set("client_id", app.ClientID) - q.Set("response_type", "code") - q.Set("redirect_uri", s.cwebsite+"/oauth_callback") - u.RawQuery = q.Encode() - - rurl = instanceURL + u.String() return } |