r/learnjavascript • • 15d ago

Simple Password input field

Hi all, I've been learning webcoding recently and Ive been wanting to make a website to use as a prop in my tabletop games.

My biggest desire right now is to do a password input where submitting an incorrect input displays an error message, while the correct input provides a redirect to a new page.

Since this will only be for my friends and wont host any private data, I'm not too concerned for heavy security, but most resources online are for actual websites and online security. Whats the best way for me to implement something like this?

6 Upvotes

12 comments sorted by

View all comments

2

u/TinyNiceWolf 15d ago

As another option, you might consider basic authentication. This is secure (as long as your site uses https) and requires no javascript code, just two config files to set it up.

1

u/Successful-Throat621 15d ago

oo i'll look into this! ty