ring

jtth 2020-04-17T22:30:02.028100Z

how am i supposed to be, say, redirecting back to a url after a login attempt? I keep getting csrf errors with this (luminus)

(defn login! [{:keys [session params]}]
  "logs user in"
  (if-let [user-identity (authenticate
                           (get-in params [:email])
                           (get-in params [:pass]))]
    (-> (response/found "/authenticated-test") ;; fixme: this just... doesn't work
        (response/ok)
        (assoc :session (assoc session :identity user-identity)))
    (response/unauthorized {:result  :unauthorized
                            :message "login failure"})))

seancorfield 2020-04-17T22:40:20.028600Z

@jtth Looks like you're overriding the redirect response/found with response/ok there?

jtth 2020-04-20T15:47:53.028700Z

that was it! thank you very much!