Ancestors

Toot

Written by Łukasz Wójcik on 2025-01-03 at 22:05

Has anyone implemented user authentication system to a static site (think: #Eleventy / #Hugo / anything that ends up as a bunch of HTML pages)?

I'd love to restrict access to one of my semi-public sites to a specific group of friends and assign them their own user-password pairs.

I'd love something nicer than plain .htpasswd.

I'd love it to be as plain and simple as possible. Only a login form. No user sign up, no password reminders. Maybe magic links via email or even static user-password pairs stored in a secure manner on some external backend server.

Of course, I want to self-host it, I want to spend as little time as possible maintaining it, but I could pay a reasonable sum for a nice out-of-the-box solution.

Any suggestions?

(I know Authorizer - https://authorizer.dev/ - but I wonder if there's anything else I haven't discovered)

=> More informations about this toot | More toots from lukem@hachyderm.io

Descendants

Written by James Cridland on 2025-01-03 at 22:58

@lukem Going to be hard on a static website.

.htpasswd would allow you to send a link with username:password in the URL, so the user need only know that this is their special link. You’d need to be running Apache or similar to achieve this though (ie not a “serverless” solution like S3).

I guess you could write a bit of JavaScript that builds that URL for you from a static login page? Similarly, I guess you could also use JavaScript to echo back the username on the page, and a “log out” function that removes those from the URL.

=> More informations about this toot | More toots from james@bne.social

Written by WTL on 2025-01-04 at 00:14

@lukem @jcrabapple 🤔 I think for the effort, using the .htpasswd is the easiest way to do this.

=> More informations about this toot | More toots from WTL@mastodon.social

Written by Bob Monsour on 2025-01-04 at 00:44

@lukem There’s this post, but it relies on Netlify and a Supabase account. https://11ty.rocks/posts/building-a-membership-site-with-11ty/

=> More informations about this toot | More toots from bobmonsour@indieweb.social

Written by Łukasz Wójcik on 2025-01-08 at 13:16

@bobmonsour catching up with notifications...

Thanks for this! Will have a look.

=> More informations about this toot | More toots from lukem@hachyderm.io

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113766688976976518
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
269.773919 milliseconds
Gemini-to-HTML Time
1.012857 milliseconds

This content has been proxied by September (3851b).