Fork me on GitHub
#reagent
<
2016-03-11
>
pez10:03:07

I’m having problems doing js/history.back. It crashes inside react somewhere. As I am using Accountant, I was hoping to find some support there for this, but it has not and I conclude that I am thinking about this the wrong way. Someone here knows how to go about it?

hugobessaa10:03:07

@pez have you tried using the same code outside react? can you give us some sample code?

pez11:03:52

@hugobessaa: basically it was just [:a {:on-click js/history.back}]. But as I’m using Accountant there is HTML5 pushState involved and such.

hugobessaa11:03:40

have you tried #(.back js/history) ?

pez12:03:18

I’ll try it now. 😃

pez12:03:57

@hugobessaa: That worked of course. Thanks! I have some reading up to do on interop.

grav17:03:57

@hugobessaa: js/history.back yields #object[back "function back() { [native code] }”], so why the need for wrapping it? Is there a difference between javascript functions and cljs functions?

hjrnunes17:03:10

Quick one: what do people use to hash passwords in Reagent (or CLJS in general) or otherwise stop them from being transmitted in plain text over network?

hugobessaa17:03:43

@grav: I'm not sure. maybe @mikethompson can answer

cky18:03:38

@hjrnunes: I don’t know if there’s anything Reagent- or ClojureScript-specific, but when I Googled for “clojure bcrypt OR scrypt” this came up: https://github.com/weavejester/crypto-password (plus I think highly of a lot of @weavejester’s stuff in general).

cky18:03:46

(In today’s world, the only decent password hashing systems are bcrypt and scrypt. Which is why I did not just Google for “clojure password hashing”.)

smw18:03:02

Has Argon2 been found to be weak?

gadfly36118:03:52

(x-posting from #C0MDSV2LW) Please vote if you're interested https://twitter.com/mihaelkonjevic/status/708318966863761408

cky18:03:15

@smw: Huh, I haven’t heard of Argon2 until now. Thanks for the pointer! I’m not a crypto expert, so I go by what I read from the likes of https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2015/march/enough-with-the-salts-updates-on-secure-password-schemes/ (which was written before Argon2 existed).

cky18:03:02

(though that article did mention the Password Hashing Competition, which Argon2 won)