News for hackers. Stuff that matters.

wowwhoknew

Uhh... I heard Iranian authorities called Iraqi authorities and notified them that missiles were incoming within an hour or so.

"Iraq says Iran warned them of missile attack before it happened"

https://nypost.com/2020/01/08/iraq-says-iran-warned-them-of-...

Re:Ask HN: How many of you are rolling your own auth? on Thursday January 09, 2020 @01:26PM (#22003905)
Is the question just "How many of you are rolling your own auth?" Because, if that's simply the extent of the question....

Well, I use npm's bcrypt + postgres DB of users (on an expressjs server, where I use knexjs for easy DB connection & use of JS logic in DB work).

1. Simply salt their PW when they create their account (which is simply a record in the DB) and store the salted version in the DB.

2. When they log in, salt the pw they entered during login and compare it with the salted one in the DB.

It's not tough.

Is it insanely secure? Nah, I am sure I am missing pieces involved in server and app security. But insanely stringent security doesn't matter for my purposes and use cases.

Password salting... About 4 lines of code: https://www.npmjs.com/package/bcrypt

Storing salted password in DB... another few more lines of code depending on what you use.

I'd say you can do this in under 10 lines of code.

However, that is of course excluding the underlying system and other logic which hosts this process of salting, storing, and then on login, comparing.

...However, if the question is really more like "How many of you are rolling your own auth which works in a high traffic, highly exposed situation, where expert levels of security are necessary?" then you'll likely encounter a different pattern of answers.

Re:Ask HN: How do I build a browser game? on Wednesday January 01, 2020 @02:05AM (#21927020)
One section of this tutorial is 3.5 hours on how to make a basic clone of agar.io

https://www.udemy.com/course/socketio-with-websockets-the-de...

I'd suggest checking out similar types of tutorials -- clones of popular browser games, to see how different ones are built, and how to approach the various aspects of creating one.