summaryrefslogtreecommitdiff
path: root/internal/server/institute
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-10-31 11:49:08 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2023-11-01 11:37:39 +0100
commitcad29dcc046163a944167bbaf2292b3e591e01c6 (patch)
treed0d9aa05fb426b08360673ee61b7d0dfdd833dd7 /internal/server/institute
parentdb2b2ac0406877c80c3bcc578a32850de7caab7a (diff)
OAuth + Server: Make ISS optional for custom servers
Diffstat (limited to 'internal/server/institute')
-rw-r--r--internal/server/institute/institute.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/server/institute/institute.go b/internal/server/institute/institute.go
index 46977ac..82e51e6 100644
--- a/internal/server/institute/institute.go
+++ b/internal/server/institute/institute.go
@@ -43,6 +43,10 @@ func New(
API := b.Endpoints.API.V3
s := &Server{Basic: b}
+
+ if url == "" {
+ return nil, errors.New("URL passed to OAuth is empty")
+ }
s.Auth.Init(clientID, url, API.Authorization, API.Token)
return s, nil
}