Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions go+htmx/handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (h *Handler) Home(w http.ResponseWriter, r *http.Request) {

data := HomeData{
LoggedIn: user != nil,
LoginURL: "/auth/login?return_to=/private",
LoginURL: "/auth/login",
}
if user != nil {
data.Username = user.Username
Expand All @@ -62,16 +62,13 @@ func (h *Handler) Private(w http.ResponseWriter, r *http.Request) {
}

if user == nil {
http.Redirect(w, r, "/auth/login?return_to=/private", http.StatusSeeOther)
http.Redirect(w, r, "/auth/login", http.StatusSeeOther)
return
}

logout, ok := authara.LogoutFormDataFromRequest(
r,
"/auth/login?return_to=/private",
)
logout, ok := authara.LogoutFormDataFromRequest(r, "")
if !ok {
http.Redirect(w, r, "/auth/login?return_to=/private", http.StatusSeeOther)
http.Redirect(w, r, "/auth/login", http.StatusSeeOther)
return
}

Expand All @@ -95,7 +92,7 @@ func (h *Handler) PrivatePulse(w http.ResponseWriter, r *http.Request) {
}

if user == nil {
http.Redirect(w, r, "/auth/login?return_to=/private", http.StatusSeeOther)
http.Redirect(w, r, "/auth/login", http.StatusSeeOther)
return
}

Expand Down
2 changes: 1 addition & 1 deletion go+react/web/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function App() {

const isPrivate = window.location.pathname === "/private";

const loginURL = "/auth/login?return_to=/private";
const loginURL = "/auth/login";

if (user === undefined) {
return (
Expand Down
Loading