Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 52d9c94

Browse files
committed
Let the user know when their login is failure due to blocked 3rd party cookies
1 parent c32d70a commit 52d9c94

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

webui/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ func auth0CallbackHandler(w http.ResponseWriter, r *http.Request) {
5353
},
5454
}
5555
code := r.URL.Query().Get("code")
56+
if code == "" {
57+
log.Printf("Login failure from '%v', probably due to blocked 3rd party cookies\n", r.RemoteAddr)
58+
errorPage(w, r, http.StatusInternalServerError,
59+
"Login failure. Please allow 3rd party cookies from https://dbhub.eu.auth0.com then try again (it should then work).")
60+
return
61+
}
5662
token, err := conf.Exchange(oauth2.NoContext, code)
5763
if err != nil {
5864
log.Printf("Login failure: %s\n", err.Error())

0 commit comments

Comments
 (0)