Has anyone tried to create a simple way of authentication using Netlify Functions checking a submitted password against one saved in an environment variable?
The logic is roughly like this:
- show user an input field to submit password
- use a function to get that password to “server” side
- check that password against an environment variable
- if password matches, redirect to index page
- if not, reject access to site
Any ideas how to go about this, please?
Not gonna lie - I could use netlify built-in auth, but I don’t need a $15/mo plan for this single site that is being used once in a blue moon.