pingvin-share icon indicating copy to clipboard operation
pingvin-share copied to clipboard

🚀 Feature: Add warning to prevent lockout admin user when disabling normal login

Open olsonnn opened this issue 1 year ago • 1 comments

🔖 Feature description

Happens if you do this:

  1. Configure social login (Microsoft)
  2. Test social login
  3. Disable normal user /password login.
  4. No admin user anymore as this was not done in step 2

🎤 Pitch

How to prevent During disable normal login, check if there at least ONE admin in social login. If not, do not allow to disable it/ show warning

olsonnn avatar Oct 02 '24 19:10 olsonnn

Since I crashed into the same issue, I want to provide a workaround until a warning will be implemented.

  1. Open a terminal at the location of your docker-compose.yml
  2. Install sqlite3 (debian/ubuntu: sudo apt install sqlite3)
  3. Run sudo sqlite3 data/pingvin-share.db
  4. Run UPDATE Config SET value = 'false' WHERE name = 'oauth.disablePassword';
  5. CTRL + C to exit and then restart Pingvin Share with a quick docker compose down followed by docker compose up -d

InvitedToHell avatar Oct 16 '24 21:10 InvitedToHell

Thanks for this!

I just had the same issue:

I have two accounts: pingvin_admin and my user account which was created during OIDC signup I then linked them due to same email (or happened automatically), then pingvin_admin no longer had admin access and I had no way to make him admin again.

Using the DB like desribed above but instead of the UPDATE command I ran:

UPDATE "User"
SET isAdmin = 1
WHERE username = 'pingvin_admin';

After that I was admin and chose different email adresses for both users, but this may be worth something to fix, so users don't get locked out.

CrazyWolf13 avatar Jun 07 '25 14:06 CrazyWolf13