Skip to content

Commit 3488093

Browse files
authored
handle empty redirect URL (#57)
1 parent 0b91d50 commit 3488093

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/oauth2/oauth2.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ func WaitForCallback(clientConfig ClientConfig, serverConfig ServerConfig, hc *h
209209
}
210210

211211
srv.Addr = redirectURL.Host
212+
if redirectURL.Path == "" {
213+
redirectURL.Path = "/"
214+
}
212215

213216
http.HandleFunc(redirectURL.Path, func(w http.ResponseWriter, r *http.Request) {
214217
defer func() {

0 commit comments

Comments
 (0)