[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

How do I write a user login system with JavaScript?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 23
Thread images: 1

File: javascript_logo.png (72KB, 300x300px) Image search: [Google]
javascript_logo.png
72KB, 300x300px
How do I write a user login system with JavaScript?
>>
Using jwt
>>
Send username and password to server. Use ajax or just plain post request.
>>
sudo code
if user == "user1" && password == "password1":
login("user1")
else if user == "user2" && password == "password2":
login("user2")
...
else:
return false
>>
>>57523438
that doesn't look very secure
>>
>>57523406
php
>>
>>57523571
Just change the variable names so it's harder for the hackers to figure out what the code does, client side.
>>
client side crypto libs exist like aes and bcrypt
>>
why would you write it with JS?
>>
Why would u even write this in javascript clientside, do it server side
>>
>>57523628
That does not sound like a safe solution. Would be better to check it somewhere else.
>>
Do I even need a SQL DB if all I need to store is a dozen users ?

I want thinking of just having a text file server side with some synthax like
username:pwd:arg1:arg2:etc..
>>
>>57524421
>Do I even need a SQL DB
Of course not.
You should be using MONDODB like the rest smart individuals who write js.
>>
>>57523406
>Do I even need a SQL DB if all I need to store is a dozen users ?
>
>I want thinking of just having a text file server side with some synthax like
>username:pwd:arg1:arg2:etc..
Use noSQL
>>
>>57524258
So, theoretically, if someone was new to these programmings, how would someone go about writing it server side?
>>
>How do I write a user login system with JavaScript?
Except it runs on the server side, you don't.

It will be insecure as fuck
>>
>>57524440
>MONDODB

Is proper typing that hard on a macbook?
>>
>javascript
>2016
>>
>>57524808
this.
Trumpscript will BTFO JS
>>
>>57523406
D O N T
D O
T H I S

https://www.youtube.com/watch?v=8ZtInClXe1Q
>>
npm install passport


you'll figure out the rest
>>
>>57523438
Hard coding every user in.
Might as well off yourself.
>>
>>57524288
It's completely safe, just trust me.
Thread posts: 23
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.