diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-10-31 11:49:08 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2023-11-01 11:37:39 +0100 |
| commit | cad29dcc046163a944167bbaf2292b3e591e01c6 (patch) | |
| tree | d0d9aa05fb426b08360673ee61b7d0dfdd833dd7 /internal/server/institute | |
| parent | db2b2ac0406877c80c3bcc578a32850de7caab7a (diff) | |
OAuth + Server: Make ISS optional for custom servers
Diffstat (limited to 'internal/server/institute')
| -rw-r--r-- | internal/server/institute/institute.go | 4 |
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 } |
