This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-25
Channels
- # announcements (4)
- # asami (26)
- # babashka (82)
- # beginners (27)
- # biff (6)
- # boot (1)
- # calva (42)
- # cider (2)
- # clj-commons (1)
- # clj-http-lite (2)
- # clj-kondo (37)
- # cljdoc (1)
- # clojure (46)
- # clojure-europe (34)
- # clojure-nl (1)
- # clojure-norway (7)
- # clojure-uk (2)
- # clojurescript (54)
- # code-reviews (18)
- # cursive (2)
- # datalevin (32)
- # datomic (7)
- # etaoin (1)
- # fulcro (9)
- # gratitude (3)
- # hyperfiddle (15)
- # introduce-yourself (1)
- # jobs (2)
- # lsp (32)
- # nrepl (1)
- # off-topic (18)
- # pathom (17)
- # pedestal (5)
- # polylith (89)
- # reitit (7)
- # releases (3)
- # remote-jobs (4)
- # shadow-cljs (52)
- # spacemacs (3)
- # squint (14)
- # tools-build (10)
- # tools-deps (18)
- # vim (4)
- # xtdb (34)
Hey, how would you do traditional auth with biff?
like password auth? at the moment you'd have to implement it yourself, though I am actually planning to add it to biff hopefully soon. if you wanted to take a crack at implementing it, I'd first familiarize yourself with the code in auth.clj. then you can add two more post endpoints, one for signup and one for signin. see https://luminusweb.com/docs/security.html for a quick example of hashing and verifying a password. on signup you'll take the password's hash and store it on the user document, and on signin you'll take a new hash and verify it against the stored hash.
no problem! on the client side you can use a regular <input type="file" ...
element. put it inside a form that does a POST request. on the server side, set up a POST handler function to receive the form. then check the :params
key in the request. there will be a tempfile that you can read from or copy (see
).
Thank you, so is it more or less like https://luminusweb.com/docs/routes.html#handling_file_uploads?
Yep, same thing pretty much.