---
title: "Discussion on \"Introducing StaticShield🛡: Password protect a website in less than 2 mins.\" | Hashnode"
description: "Discussion on \"Introducing StaticShield🛡: Password protect a website in less than 2 mins.\". How I built StaticShield 🏭"
url: "https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Introducing StaticShield🛡: Password protect a website in less than 2 mins.](https://lalit2005.hashnode.dev/staticshield?utm_source=hashnode&utm_medium=feed)

How I built StaticShield 🏭

Jun 30, 2021 · 8 min read · lalit2005.hashnode.dev  
Updated Jul 1, 2021  
Read the article

-   [#harperdbhackathon](https://hashnode.com/tag/harperdbhackathon)
-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#programming](https://hashnode.com/tag/programming)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Lalit](https://hashnode.com/@lalit2005)

@lalit2005 · Bangalore, India

  
[View profile](https://hashnode.com/@lalit2005)

17, webdev & all things code • cs @bitspilaniindia '27

## Responses 16

Markdown supported · ⌘↵ to post

[Andrew Baisden](https://hashnode.com/@andrewbaisden)

[Jul 7, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e5a0f8e9aeb8301a6a9a53)

Now this is a really good product idea good job [Lalit](https://hashnode.com/@lalit2005) 👏

[Lalit](https://hashnode.com/@lalit2005)

[Jul 7, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e5a0f8e9aeb8301a6a9a53#reply-60e5a2e94aacd63048246fa6)

Thank you so much [Andrew Baisden](https://hashnode.com/@andrewbaisden)

[Aditya Mitra](https://hashnode.com/@aditya-mitra)

[Jul 7, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e56236e9aeb8301a6a903a)

This is one product that I had been looking for. I always wanted to created something like this but never got the time.

Congratulations!

[Lalit](https://hashnode.com/@lalit2005)

[Jul 7, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e56236e9aeb8301a6a903a#reply-60e566fee9aeb8301a6a91bc)

Thanks [Aditya Mitra](https://hashnode.com/@aditya-mitra)

Hope you liked it 🙂

[Piotr Badełek](https://hashnode.com/@pzpl)

[Jul 5, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e32e4675c814115cc885bc)

The idea is really nice, but since this is client-side, it can easily be avoided: [https://disk.yandex.com/i/u\_yuF6BhxMVF2Q](https://disk.yandex.com/i/u_yuF6BhxMVF2Q)  
I can just block the entire staticshield.vercel.app domain and add some custom CSS to bypass staticshield.  
This is not a very secure solution. Also, the page that informs you that you need to enable javascript ( [https://staticshield.vercel.app/errors/noscript](https://staticshield.vercel.app/errors/noscript) )... does not work without javascript

[Lalit](https://hashnode.com/@lalit2005)

[Jul 5, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e32e4675c814115cc885bc#reply-60e3327775c814115cc88635)

Hello [Piotr Badełek](https://hashnode.com/@pzpl), I am aware that you can bypass now. I am fixing all these issues currently with a greater security in place. This will be out soon. For now, you can use it with apps that has non-developer users.

> [staticshield.vercel.app/errors/noscript](https://staticshield.vercel.app/errors/noscript) )... does not work without javascript

Yeah, I've noticed it. I'm finding solution to avoid this. I'll be fixing this soon

[Milo 🏳️‍🌈 🦋 Xeon](https://hashnode.com/@mvoloskov)

[Jul 3, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e0cc9903707d644a5016f2)

This is simply amazing. Authorization is a notoriously common thing to do wrong. To just automate it, what a brilliant idea!

What about privacy, though?

[Lalit](https://hashnode.com/@lalit2005)

[Jul 4, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e0cc9903707d644a5016f2#reply-60e16b024f8e376422a7902b)

Thanks for the kind words [Miloslav 🏳️‍🌈 🦋 Voloskov](https://hashnode.com/@mvoloskov)

> What about privacy, though?

Do you mean users' privacy? If yes, every user data is handled by Auth0, which is trusted by many companies. StaticShield accesses only email, name, nickname, profile picture and user-id of users.

Please do let me know your queries 🙂

[Milo 🏳️‍🌈 🦋 Xeon](https://hashnode.com/@mvoloskov)

[Jul 4, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e0cc9903707d644a5016f2#reply-60e184194f8e376422a7926e)

[Lalit](https://hashnode.com/@lalit2005) auth0? Nice! I’ll definitely give it a try then 👍

[Lalit](https://hashnode.com/@lalit2005)

[Jul 4, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e0cc9903707d644a5016f2#reply-60e1eef54f8e376422a7a491)

I'm looking forward to it 👀 [Miloslav 🏳️‍🌈 🦋 Voloskov](https://hashnode.com/@mvoloskov)

[Gaurav Tewari](https://hashnode.com/@tewarig)

[Jul 3, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e024e04f8e376422a76eed)

This is next-level work. a password-protected site just in two min. Awesome !!

[Lalit](https://hashnode.com/@lalit2005)

[Jul 3, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60e024e04f8e376422a76eed#reply-60e027bd03707d644a4ffeeb)

Thanks a lot [Gaurav Tewari](https://hashnode.com/@tewarig)

Glad you liked it 🙂

[Rutik Wankhade](https://hashnode.com/@rutikwankhade)

[Jul 2, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60de88512c9e6e17804768f5)

This is awesome man!! 🚀🚀 The UI sure does give the vercel vibe. Great job with the implementation. 👏👏

[Lalit](https://hashnode.com/@lalit2005)

[Jul 2, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60de88512c9e6e17804768f5#reply-60de89082c9e6e178047690a)

This means a lot. Thanks you so much [Rutik Wankhade](https://hashnode.com/@rutikwankhade)

[Candy](https://hashnode.com/@candyspage)

[Jul 2, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60de588cd7a2b81724511fa3)

Liked your project idea a lot!!!

[Lalit](https://hashnode.com/@lalit2005)

[Jul 2, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60de588cd7a2b81724511fa3#reply-60de741ed7a2b817245120c7)

Glad you liked my project [Candy Tsai](https://hashnode.com/@candyspage) 🙂

[itkj](https://hashnode.com/@itkj)

[Jul 1, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60ddf878d7a2b81724511a0e)

Thank u for new knowledge for me.

-   [Greeting](https://hashnode.com/posts/staticshield/www.ferinugroho.my.id) -

[SHOBHIT RASTOGI](https://hashnode.com/@rs909)

[Jul 1, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dd885695305075b9339517)

[Lalit](https://hashnode.com/@lalit2005) Your site and work looks amazing. Keep up the great work. But does it really works ? scripting based security can be manipulated in browser, One can block the script in browser and can access the secured page even without password.

1.  Block the [script](https://staticshield.vercel.app/script.js) in browser.
2.  Unhide staticshield-div

And there you go you can see the secured page, no matter how many times it is hashed :p

Maybe this can be used as a quick solution but not certainly to make anything secured,

Please let me know if I am missing anything.

[SHOBHIT RASTOGI](https://hashnode.com/@rs909)

[Jul 2, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dd885695305075b9339517#reply-60deb5a64f8e376422a74bd1)

[Amal Shaji](https://hashnode.com/@amal) That is an excellent observation.

[Lalit](https://hashnode.com/@lalit2005)

[Jul 3, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dd885695305075b9339517#reply-60e0276e03707d644a4ffedc)

[Amal Shaji](https://hashnode.com/@amal) I do not know why jwt.io shows the signature is verified, but the [jwt token is signed with a different key (`JWT_TOKEN`)](https://github.com/Lalit2005/staticshield/blob/c4b48243e12e57f9f23b34bb4695e91bfb43b393/pages/api/login-to-site.ts#L95) and the `.` is replaced with an other key (`TOKEN_SECRET`)

[Amal Shaji](https://hashnode.com/@amal)

[Jul 3, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dd885695305075b9339517#reply-60e0291f4f8e376422a76f7c)

[Lalit](https://hashnode.com/@lalit2005) The only way the signature gets verified is only when the tokens are the same. I did not introduce any external factors, all the variables are derived from the token presented to me after a login.

[Yafet Shah](https://hashnode.com/@yafet92)

[Jul 1, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dd73340970dd75de76f441)

Wow! This saved my day!

Loved it

Going to use it to protect our small company's MRR details and analysis. Very handy indeed.

Thanks for the project [Lalit](https://hashnode.com/@lalit2005)!!

[Lalit](https://hashnode.com/@lalit2005)

[Jul 1, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dd73340970dd75de76f441#reply-60dd743c95305075b93391a9)

Happy to see StaticShield in wild!

Thanks [Yafet Shah](https://hashnode.com/@yafet92)

[Prince Codes](https://hashnode.com/@princecodes247)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dcc8db0970dd75de76e5fb)

Awesome

[Lalit](https://hashnode.com/@lalit2005)

[Jul 1, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dcc8db0970dd75de76e5fb#reply-60dd73ad0970dd75de76f460)

Thanks [Prince Codes](https://hashnode.com/@princecodes247)

Hope you liked it

[Patrick](https://hashnode.com/@patik123)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc6dc20970dd75de76dcfb)

Great thing. Good luck @lalit2005.

[Lalit](https://hashnode.com/@lalit2005)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc6dc20970dd75de76dcfb#reply-60dc6e3c0970dd75de76dd09)

Thanks [Patrick](https://hashnode.com/@patik123)

Hope you liked StaticShield 🙂

[Patrick](https://hashnode.com/@patik123)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc6dc20970dd75de76dcfb#reply-60dc71a495305075b9337a5d)

[Lalit](https://hashnode.com/@lalit2005) Yes, it is great maybe I will use it in my next project. 😊

[Lalit](https://hashnode.com/@lalit2005)

[Jul 1, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc6dc20970dd75de76dcfb#reply-60dd73950970dd75de76f45a)

[Patrick](https://hashnode.com/@patik123)

Wow, glad to hear that. I'm waiting for you to use StaticShield 🙂

[Shyam Ganesh](https://hashnode.com/@shyam24089)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc666b95305075b9337948)

This is amazing Lalit I have used this and it is awesome.

[Lalit](https://hashnode.com/@lalit2005)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc666b95305075b9337948#reply-60dc66be95305075b9337960)

Thanks [Shyam Ganesh](https://hashnode.com/@shyam24089)

Hope you liked it :)

[Amal Shaji](https://hashnode.com/@amal)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc48f295305075b9337702)

Regarding the security,

```
const bcryptHashedPassword = bcrypt.hashSync(reversedSHAHash, 5);
```

Here `5` is the `salt round` or `cost factor`. The total number of rounds/times hashed = 2 ^ (salt rounds). So your implementation hashes the password 32 times. Nowadays, bcrypt libraries use the cost factor of `10` by default, i.e., 1024 rounds.

[Lalit](https://hashnode.com/@lalit2005)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc48f295305075b9337702#reply-60dc4b770970dd75de76da64)

Oh I did not know about that at all!

Thanks a lot [Amal Shaji](https://hashnode.com/@amal)

[Jake David](https://hashnode.com/@jakedavid5002)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc264d7ad49f6471acd588)

This is really really awesome. Good luck [Lalit](https://hashnode.com/@lalit2005)

[Lalit](https://hashnode.com/@lalit2005)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc264d7ad49f6471acd588#reply-60dc2dc17ad49f6471acd759)

Thanks Jake David 🙂

[Savio Martin](https://hashnode.com/@saviomartin)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc18d67ad49f6471acd36c)

This is amazing Lalit. Excellent work done. The feature to protect a page in (<2 mins) is wonderful. Great Idea and implementation. 👏 I'm surely gonna use this, saves a lot of time. Loved the look and simplicity. Well done 👍 Great Job.

Keep up the amazing work [Lalit](https://hashnode.com/@lalit2005), Keep rocking 🥳

[Lalit](https://hashnode.com/@lalit2005)

[Jun 30, 2021](https://hashnode.com/posts/staticshield/60dc16d37c7df7644acde86c/comment/60dc18d67ad49f6471acd36c#reply-60dc1a217c7df7644acde903)

Thanks a lot Savio!

This means a lot. Glad you liked my project.

By the way, your project - CodeHouse is also super awesome 🔥
