Browse Source

OIDC: Redirect to user home page after successful authentication

Frédéric Guillot 2 years ago
parent
commit
bc317cfcd1
2 changed files with 2 additions and 2 deletions
  1. 1 1
      internal/ui/middleware.go
  2. 1 1
      internal/ui/oauth2_callback.go

+ 1 - 1
internal/ui/middleware.go

@@ -257,6 +257,6 @@ func (m *middleware) handleAuthProxy(next http.Handler) http.Handler {
 			config.Opts.BasePath(),
 			config.Opts.BasePath(),
 		))
 		))
 
 
-		html.Redirect(w, r, route.Path(m.router, "unread"))
+		html.Redirect(w, r, route.Path(m.router, user.DefaultHomePage))
 	})
 	})
 }
 }

+ 1 - 1
internal/ui/oauth2_callback.go

@@ -149,5 +149,5 @@ func (h *handler) oauth2Callback(w http.ResponseWriter, r *http.Request) {
 		config.Opts.BasePath(),
 		config.Opts.BasePath(),
 	))
 	))
 
 
-	html.Redirect(w, r, route.Path(h.router, "unread"))
+	html.Redirect(w, r, route.Path(h.router, user.DefaultHomePage))
 }
 }