diff --git a/main.go b/main.go
index fa3afd24b1322ff5d7d3f9918849b356d89d4490..2632b2e660f6559ab3ecef0c9e43c13d509b4344 100644
--- a/main.go
+++ b/main.go
@@ -151,6 +151,8 @@ func main() {
 			pageContentString := string(contents)
 			// Replace redirectUri by the host in the body
 			pageContentString = strings.ReplaceAll(pageContentString, redirectUri, replyUri)
+			// Prevent the closure of the opener
+			pageContentString = strings.ReplaceAll(pageContentString, "this.window.opener.location.href = url;", "this.window.location.href = url;")
 			fmt.Println(pageContentString)
 			// Convert string to byte for response writting
 			newPageContentByte := []byte(pageContentString)