#1 2026-04-12 22:39:28

kap55
Member
2024-11-14
17

Accessing Piwigo Mobile App With 2FA

Hi

I have been using 2FA to access my account for several months but have been unable to access my web site using the Android mobile app.  I have created an API key and tried several times to login but get an instant login failure every time I try.  The API key generator seems to be working fine - I have generated a separate key to use for darktable login/uploading of photos to my site.

I would appreciate any suggestions anyone might have.  Thank you.

Brian

Piwigo 16.3.0 Check for upgrade
Installed on 13 November 2024, 1 year 4 months 4 weeks 1 day ago
Operating system: Linux
Container info: (unofficial) LinuxServer.io 16.3.0-ls334
PHP: 8.4.16 (Show info) [2026-04-12 20:36:33]
MySQL: 11.4.10-MariaDB-ubu2404 [2026-04-12 13:36:33]
Graphics Library: External ImageMagick 7.1.2-15
Cache size 1555.19 MB right now Refresh
Activated plugin list21
Add < head > element
Admin Tools
Batch Downloader
BBCode Bar
Contact Form
EditorPlus
Exif View
Force HTTPS
GThumb+
Header Manager
Language Switch
LocalFiles Editor
No Stats For Robots
Perso About
Photo Update
Piwigo Failed Login logger
PWG Stuffs
rightClick
Security Headers
Take A Tour of Your Piwigo
Two Factor Authentication

Piwigo URL: https://ppgphotos.com/

Offline

 

#2 2026-04-13 09:08:21

RushLana
Piwigo Team
2025-09-03
47

Re: Accessing Piwigo Mobile App With 2FA

Hi kap55,

I tried 2FA on my end and it worked.

Are you sure you are using the PkID instead of your usual login in the app ?

If so can you open an issue here so I can track it and work on it ?
https://github.com/Piwigo/piwigo-flutter-app/issues

Offline

 

#3 2026-04-13 14:21:35

kap55
Member
2024-11-14
17

Re: Accessing Piwigo Mobile App With 2FA

Hi RushLana,

Thanks for your response.  I definitely used the PkID/Secret Key combination rather than my normal password - in fact I've tried a couple of PkIDs dozens of times.

I have noticed that there are three different versions of Piwigo for Android on the Google Play Store.  Two versions have been authored by Gareth Deli (Piwigo Client Basic and Piwigo Client Pro) and one version (Piwigo NG) has been authored by the Piwigo Team.  I have been using Piwigo NG because the other two versions are no longer under active development.  Could I please ask which version you used to test logging in?  Thank you.

Offline

 

#4 2026-04-13 15:27:08

RushLana
Piwigo Team
2025-09-03
47

Re: Accessing Piwigo Mobile App With 2FA

Hi,

Piwigo NG is indeed the right app.

I tried 2FA logins with Piwigo NG 2.4.3 from Fdroid (Izzy-droid) and 2.4.2 from the Play Store.
This may be tied to your plugins but I don't understand how since darktable works.

I will try installing the same plugins tomorrow.

If possible try installing the official docker container (https://piwigo.org/guides/install/docker) and testing 2FA  if it work, this may be tied to the linuxserver container.

Offline

 

#5 2026-04-13 15:48:59

kap55
Member
2024-11-14
17

Re: Accessing Piwigo Mobile App With 2FA

I am using version 2.4.2 of the Piwigo mobile app from the Play Store on my phone.

My Piwigo installation is in a docker container (via Portainer) on a Synology NAS.

I was able to login to the mobile app (with normal username/password) prior to installing the 2FA plugin.  I am able to use both TOPT and API successfully - TOPT to login to my web site and API to allow darktable to upload edited photos to my web site.  Everything works as expected except the login to the mobile app.

Perhaps the problem is with version 2.4.2.  I just signed up to be a beta tester for Piwigo NG and will see if that makes any difference.

Offline

 

#6 2026-04-13 16:53:43

kap55
Member
2024-11-14
17

Re: Accessing Piwigo Mobile App With 2FA

OK there is something strange going on here.  It may be that I am logged into the mobile app and have been all along - in fact it seems I am unable to sign out of the app.

When I logout of the app the username always defaults to guest.  That is the only name that I appear to be able to login with.  If I try to use API generated by my website I get rejected.  The app always loads my web site but I thought I was viewing as a guest however after just trying it appears I have full administrative privileges.  Even if I logout, clear the cache and uninstall the app I immediately have (without logging in) full administrative privileges after reinstalling the app.  Is this normal behaviour?

From what I can see the app continued to keep me logged in after 2FA was initiated from my main site.  I have never been able to login with API because that app will not log me out.  This is despite clearing cache and deselecting the Remember credentials switch several times.  In fact the Remember credentials switch resets itself every time I return to the login screen.

Hope I was able to explain myself sufficiently.  I am not really sure what is going on but I do believe it is a security issue if I am unable to logout from the mobile app.

Offline

 

#7 2026-04-13 19:37:45

erAck
Only trying to help
2015-09-06
2236

Re: Accessing Piwigo Mobile App With 2FA

kap55 wrote:

Even if I logout, clear the cache and uninstall the app I immediately have (without logging in) full administrative privileges after reinstalling the app.  Is this normal behaviour?

Maybe you have some Backup solution running on your mobile that is restoring an app's data when it is reinstalled, like Seedvault does with Automatic Restore. If so, disable that once.


Running Piwigo at https://erack.net/gallery/

Offline

 

#8 2026-04-13 20:08:19

kap55
Member
2024-11-14
17

Re: Accessing Piwigo Mobile App With 2FA

erAck wrote:

kap55 wrote:

Even if I logout, clear the cache and uninstall the app I immediately have (without logging in) full administrative privileges after reinstalling the app.  Is this normal behaviour?

Maybe you have some Backup solution running on your mobile that is restoring an app's data when it is reinstalled, like Seedvault does with Automatic Restore. If so, disable that once.

Thanks for the suggestion.

I have never installed an app like Seedvault and have just reviewed all of my installed apps.  I can see nothing that would cause this type of behaviour.

I have just tried several times (again) to log out of the Piwigo mobile app/clear the cache and restart the app.  Each time it shows the sign in name as guest and automatically opens with full administrative privileges. 

I use Bitwarden to store passwords and have turned off Autofill in case that was causing problems.

Here is where things are really strange (at least to me).  If I log out of Piwigo mobile app and try to log in using a PkID/Secret Key the login fails.  If I then leave the Username and Password blank I am able to log in with full admin privileges.  This just doesn't seem right to me.

Willing to accept any help/suggestions.  Thanks.

Offline

 

#9 2026-04-14 11:16:31

RushLana
Piwigo Team
2025-09-03
47

Re: Accessing Piwigo Mobile App With 2FA

Hi,

Can you try to clear data/cache of the App (note that uninstalling the app doesn't clear data in most cases)
If this doesn't log you out this is indeed a security issue.

Offline

 

#10 2026-04-14 14:31:39

kap55
Member
2024-11-14
17

Re: Accessing Piwigo Mobile App With 2FA

OK I think I am finally getting somewhere...

Clearing the cache has no effect on the problem.  Clearing data did finally log me out of the app.  I was able to sign in using PkID and Key, however I am now back to the same state as before - it doesn't seem possible to logout.  If I logout and clear the cache and then open the app the PkID and Key appear and automatically log into Piwigo NG.  I have checked the settings in the app and see nothing like "Auto Login" or "Stay Logged In" that I can deselect.

FWIW I am pretty certain that even though 2FA was activated on my web site a couple of months ago it had no effect on the Piwigo NG app because I was never able to logout.  I just assumed that I was logged out and every time I entered a PkID and Key it would be rejected - because I was still logged in using my Username and Password.

Hope this explanation of my situation helps - I do think there may be a security issue with Piwigo NG.

Offline

 

#11 2026-04-16 00:52:25

kap55
Member
2024-11-14
17

Re: Accessing Piwigo Mobile App With 2FA

I have tried a few things today and the app now appears to be functioning the way it should.  I have no idea why it was behaving the way it was and not logging out.  I did have "Remember credentials" deselected while trying to solve the problem earlier and it appeared that credentials were never cleared.  In any event after removing and reinstalling the app I am now able to login using 2FA API and logout without the credentials being stored.  Thank you for your help.

Offline

 

#12 2026-04-16 10:40:55

RushLana
Piwigo Team
2025-09-03
47

Re: Accessing Piwigo Mobile App With 2FA

Hi,

Happy to see it worked out for you.
I've opened an issue on github to track problem related to sessions : [Github] piwigo-flutter-app issue #257
I will try to reproduce your issue when I have the time.

Offline

 

Board footer

Powered by FluxBB