Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 8 123 ... LastLast
Results 1 to 15 of 115
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Secure Login with javascript

    Here is my "total secure login" script. Description of the contents:

    login.htm: First page. It asks login and password, combines it (Login+Password) and sends it to the next page

    auth.htm: checks for the existence of a Login+Password.js if yes (authorized user), it reads the private url and opens it, if not, it goes back to the first page, wich shows an error message

    CodingForums.js: a Login+Password.js sample. You can have as many users as you want; one .js for every one (i.e. Login: Neo, Pwd: Matrix =NeoMatrix.js). Blocking an user access is as easy as deleting his .js file

    page.htm:a sample destination page

    PasswordHelper.vbs: a nice script that creates the js files

    Of course, server side programming is much better if you have sensitive data to protect

    Edited: Due the popularity of this script, I updated the original version with the one with whammy improvements, like the Password Helper
    Attached Files Attached Files
    Last edited by Borgtex; 11-07-2003 at 11:20 AM.
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    New York
    Posts
    152
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Thumbs up

    holy $*@&

    i've been looking for a good password-gate-like thing for a loooooong time. this is awesome! i was about ready to post that i was having trouble, before i found out what to do. here's how i got it to work...

    1) unzipped the files
    2) uploaded ALL of them to my site
    3) created a new "CoddingForums.js" page and renamed "CoddingForums"
    4) in renamed "CoddingForums" page, paste all info from the text in the "CoddingForums.js" into the new, renamed page
    5) thank borgtex for the awesome script

    also, you've got to make sure the file name is "{Name}{Password}.js" no {}'s, no spaces, first letter of name and password is capitalized (or so i think. but i'm afraid to test). it works fine for me, doing the method above.

    THANKS BORGTEX!!

  • #3
    New Coder
    Join Date
    Nov 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    is it possible to make the usernames be in a drop down box instead of typing them in, if so how???

  • #4
    Regular Coder
    Join Date
    Aug 2002
    Location
    New York
    Posts
    152
    Thanks
    12
    Thanked 0 Times in 0 Posts
    hmmm... let's use My Yahoo! for example. does Yahoo! have a drop-down menu listing ALL of their members' usernames? wasnt like that the last time I checked... so i think it would just be more appropriate (in any case) for it to just be a type-in thing. because in my case, i use that script so it's harder for someone to access a certain page. giving them half of the entry information needed to access the page doesnt really help.

    but you can do what you want with the script, but i have such little knowledge of javascript that i can't help you. but hey, i know the comment tag: // yay!

  • #5
    New Coder
    Join Date
    Nov 2002
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts
    im not going to have 2143446 members only about 6 lol

  • #6
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just change the textbox for a dropdown menu, and access the value of the selectedIndex.
    If you're not familiar with dropdowns & javascript, post your question in the JavaScript programming forum
    Last edited by Borgtex; 11-26-2002 at 03:29 AM.
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    183
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If your data is that important, use .htaccess & .htpasswd to keep the unwanted out.

    If someone wants to get in, and has intermediate to advanced knowledge of javascript, they can and will
    Offtone.com - In the works...

  • #8
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just a warning: like SYP}{ER said, it is impossible to have a secure system using JavaScript alone.

    A good system would be on the server side, or use .htaccess, or both.

    But all the same, well done Borgtex for providing something that people want

    Merry Christmas Everyone!

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #9
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts
    Hm, sounds interesting. You have to download the authentication file from the server, or you're going nowhere. In this case, knowing JavaScript may not help very much -- because the password helps define the name of the script to request by HTTP.

    Creating a dropdown menu is a security risk: it gives a person who wants in but isn't authorized a much narrower field of possible filenames to search.

    Plus, there's always the possibility that a different combination of characters will yield a valid result (taking a letter off the password and sticking it on the username, for instance).
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #10
    New Coder
    Join Date
    Jan 2003
    Location
    Belgium
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nice thing dude

    little question: is it possible to mark the password field with ***** when you type your password?
    "Hell, there are no rules here-- we're trying to accomplish something."
    Thomas A. Edison (1847 - 1931)

    "Any fool can make a rule, and any fool will mind it."
    Henry David Thoreau (1817 - 1862)

  • #11
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes, you only need to use this attribute in the password input:

    <INPUT type="password" ...>
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #12
    New Coder
    Join Date
    Jan 2003
    Location
    Belgium
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OMG!!!!

    Didn't thaught about that one.

    anyway thankx m8 and keep up the good work.

    another question.

    Cos u r all leets in JS maybe I can ask u peeps to provide me with some good links to tutors etc. cos I'm not really into JS, and I'd like to be
    "Hell, there are no rules here-- we're trying to accomplish something."
    Thomas A. Edison (1847 - 1931)

    "Any fool can make a rule, and any fool will mind it."
    Henry David Thoreau (1817 - 1862)

  • #13
    Regular Coder
    Join Date
    Jun 2002
    Location
    United Kingdom Confused: Often
    Posts
    859
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by CrUdE
    maybe I can ask u peeps to provide me with some good links to tutors etc. cos I'm not really into JS, and I'd like to be
    www.javascriptkit.com has some good tutorials
    redhead

  • #14
    Registered User
    Join Date
    Jan 2003
    Location
    CT
    Posts
    91
    Thanks
    0
    Thanked 0 Times in 0 Posts
    err.....how would i make it so you can only view the website if you have entered the user name and password?
    Last edited by relyt; 01-23-2003 at 04:46 AM.

  • #15
    New Coder
    Join Date
    Jan 2003
    Location
    Belgium
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think making your index.htm the page with the javascript in it
    "Hell, there are no rules here-- we're trying to accomplish something."
    Thomas A. Edison (1847 - 1931)

    "Any fool can make a rule, and any fool will mind it."
    Henry David Thoreau (1817 - 1862)


  •  
    Page 1 of 8 123 ... LastLast

    LinkBacks (?)

    1. 02-22-2014, 08:13 AM

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •