summaryrefslogtreecommitdiff
path: root/internal/server/common.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-10-19 17:55:53 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-10-19 17:55:53 +0200
commit8fa80e56e014d9a77cfb337b2a2b641f1532ff8e (patch)
treee7a406a0b8cb05c3b232dd828dc6a5d974ca2fcb /internal/server/common.go
parent7260aa0cd70195a4679ca3c94204d9e618f947f2 (diff)
OAuth + Server: Fix ISS for secure internet
The wrong base url was used. Use the one from the home server NOT the current location
Diffstat (limited to 'internal/server/common.go')
-rw-r--r--internal/server/common.go15
1 files changed, 1 insertions, 14 deletions
diff --git a/internal/server/common.go b/internal/server/common.go
index bf6f4ca..e70bee0 100644
--- a/internal/server/common.go
+++ b/internal/server/common.go
@@ -252,21 +252,8 @@ func ShouldRenewButton(server Server) bool {
return true
}
-func GetISS(server Server) (string, error) {
- base, baseErr := server.GetBase()
- if baseErr != nil {
- return "", types.NewWrappedError("failed getting server ISS", baseErr)
- }
- // We have already ensured that the base URL ends with a /
- return base.URL, nil
-}
-
func GetOAuthURL(server Server, name string) (string, error) {
- iss, issErr := GetISS(server)
- if issErr != nil {
- return "", issErr
- }
- return server.GetOAuth().GetAuthURL(name, iss, server.GetTemplateAuth())
+ return server.GetOAuth().GetAuthURL(name, server.GetTemplateAuth())
}
func OAuthExchange(server Server) error {