Skip to content

Commit b6f065f

Browse files
authored
Merge pull request #146 from SwissOpenEM/fix-auth-callback-uri
Auth: include backendUrl in the callback redirect
2 parents bd5eab3 + 39534c3 commit b6f065f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/webserver/auth.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,12 @@ func (i *IngestorWebServerImplemenation) GetCallback(ctx context.Context, reques
175175
return globusCallbackRedirect(ctx, i.globusAuthConf)
176176
}
177177

178+
redirectUrl := i.frontend.origin + i.frontend.redirectPath + "?backendUrl=" + url.QueryEscape(i.taskQueue.Config.WebServer.BackendAddress)
179+
178180
// standard redirect to frontend if there's nothing else to do
179181
return GetCallback302Response{
180182
Headers: GetCallback302ResponseHeaders{
181-
Location: i.frontend.origin + i.frontend.redirectPath,
183+
Location: redirectUrl,
182184
},
183185
}, nil
184186
}

0 commit comments

Comments
 (0)