How do I password protect a website with static and dynamic parts? - authentication

I have a website on my personal domain that I would like to password protect securely. This website has two parts. One is a static website I have created with the SSG Eleventy and copied into the web directory. The other is an installation of MediaWiki. My site is hosted on Dreamhost shared hosting and is currently password protected with Apache .htaccess and .htpassword files for basic authentication. This is mostly fine, except for the fact that it isn’t easy to “log out”. I would like a way to password protect this site that gives me more control over logging in/out.
I want to be able to create my own log in page that looks more like the rest of the site (instead of the default Apache login page). I would also like there to be an easy way to create new users and passwords, though I want the ability to create new users to be restricted to the admin account (my login). I want users to be able to log out whenever they want, and have the site properly protected from any logged out users. I would like this password system to also protect the part of my site that is built with MediaWiki. This means that, if I navigate to a page within the wiki, I want it to redirect to the site-wide log in page, before allowing access to MediaWiki. Once the user logs in, they should have access to the whole site, including the wiki section without being prompted to enter the password again. (I am aware MediaWiki has its own login page, but I want to be able to use a single password for accessing the entire site. Also, I am NOT looking to integrate MediaWiki’s internal login with this site-wide login.)
I do not intend this site to ever have that many users. Really just me and a few others I want to invite (via their own username and password). So I really just need a simple way to manage these user accounts and prevent access to others.
What is the best way to do all this? Is it even possible to do any of this for a static website? I know I probably have to use php to make this work, which I don’t know too well, but am willing to learn. It also probably shouldn’t be too hard to create and manage a database to store the usernames and passwords if necessary. I would just like to know if all this is possible and what the easiest way to do it would be.
I am pretty new at web development and this is the first real website I have built and deployed. I would really appreciate any suggestions and help.

Related

Single sign-on (SSO) without SAML/OAuth/OIDC

Guess we are all tired of login and password system and want to go passwordless.
I saw that the only solution to login without hassle is via SAML, well bad news you have to pay some SaaS apps like slack, miro, agile crm... to have access to SAML configurations.
I'm trying to build a website, like a portal where I have links to thoses website and I just click on them and I'm auto sign-in (SSO Dashboard).
I don't want to be dependent of in-browser remember password or any password keeper like bitwarden. I want to store all of my user pass in my database.
Any hints to do this ?
I already tried this solution : https://crunchify.com/automatic-html-login-using-post-method-autologin-a-website-on-double-click/ it doesn't work at all.

What is the easiest way to authenticate a site user in browser extension

So, I've made a simple site with login form that stores user login and password hash in site's database.
Now I want to be able to know if a user is logged in on my site and what is his login/user id.
I've read that sending login and password from extension considered a bad practice. Auth2 is not very simple either.
Can you please tell me the easy way to do this?

Determine if logged in via iframe on a static jekyll blog

I am trying to build an e-learning style site similar to KhanAcademy.org. I'd like to be able to use Jekyll for the main site on www.mydomain.com. In addition, I'd like a logged in view for the user as well which would live on learn.mydomain.com. I am trying to figure out how to do a redirect on www.mydomain.com (jekyll blog) and redirect the user to the subdomain if they're logged in. The one approach I can think of is to embed an iframe, and assert if the user is logged in and then do a redirect..Not sure if that's possible or would I need to communicate with the jekyll blog using postMessage()?
I really like this setup as I can start creating static content in a nice way on the main site, and if the user decides to then create an account and/or subscribe (pay) they will be redirected to the logged in user experience which I can build on a separate stack (node, express, react). Appreciate the help and any ideas on how to implement this. I plan on using auth0 for the logged in experience.

Checking a list of logins on dropbox

I have a strange request for a project - we have a text file containing a list of login credentials for Dropbox for around 10 users. I have to validate their credentials automatically and notify the users if login fails with their credentials.
I've looked at the dropbox API, but that uses OAuth, which requires the user to manually fill in credentials, but that doesn't do the trick for me.
Is there a way for me to check if a bunch of logins? I've looked at the DropboxUpload repository on github, but it works fine for single user logins, but fails to achieve what I want when it comes to checking the same thing for multiple users.
Any help/leads on how I should go about proceeding with this would be greatly appreciated!
Many thanks,
John
You can use dropbox webpage to check user credentials doing normal login/logout but in an automated way.
To create a "bot" which will login and logout and check if credentials are correct you can use Selenium.
Selenium is a framework for testing web page ui but it can also be used to create automated checker/tester/bot for what you need.
It is also possible to setup selenium in a such way that it will use renderless browser engine so no browser will be visible during test/check. This also speeds up the process of testing.
I hope this will help you if you'll not find any better way and can be used as a final solution since it is not the best way to check credentials

How do I Force User friendly URLs In sharepoint for a My Site Collection

Disregarding my question I asked earlier (and deleted) which has been solved, I want to know, how do I force sharepoint to generate user-friendly my site collection URLs?
To make the question easier, I'll include an example.
http://spaces.companyspttest.biz/Person.aspx?accountname=ADtest\Eon
must become
http://spaces.companyspttest.biz/Eon
How do I do this?
Ok, seems like what I have been looking for is a Self-Service Site Creation.
To activate it , go to Web applications management in Central Administration in Sharepoint, ,Select the web application which requires this "Shortened URL",Click Self Service Site Creation in the ribbon, and turn it on.
After that, add a Managed path to the web application called Profiles.
Not 10000% what I wanted regarding the URL, but definitely the page I wanted to see when I type the URL.