Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
S

SpartanSpark

@SpartanSpark
Unfollow Follow
About
Posts
2
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • 2FAuth – OAuth keys regenerated on every app restart, invalidating browser extension tokens
    S SpartanSpark
    2FAuth

    Hello @james @girish thank you so much!!


  • 2FAuth – OAuth keys regenerated on every app restart, invalidating browser extension tokens
    S SpartanSpark
    2FAuth

    Hello Cloudron Support Team,

    I would like to report what appears to be a packaging issue with the 2FAuth application on Cloudron.
    For several weeks, I have been experiencing recurring authentication failures with the 2FAuth browser extensions on multiple computers, affecting both Chrome and Firefox.
    Every two to three days, the extensions stop working and require complete reconfiguration, including generating new access tokens.
    After investigating the application logs and startup scripts, I believe I have identified the likely cause.

    1. Authentication failures

    The application logs show repeated HTTP 401 Unauthorized responses on API endpoints, including:

    GET /api/v1/features 401
    GET /api/v1/groups 401
    GET /api/v1/twofaccounts 401
    GET /api/v1/user/preferences 401

    Laravel Passport also reports:

    League\OAuth2\Server\Exception
    OAuthServerException

    The resource owner or authorization
    server denied the request.

    2. OAuth key modification after an update

    Both OAuth key files were modified on November 21, 2026, at approximately 22:00 UTC, coinciding with the latest Cloudron application update.
    The files are correctly stored in the persistent directory /app/data/storage/, and /app/code/storage/ points to the same files.

    3. Suspected issue in the Cloudron startup script

    While inspecting /app/pkg/start.sh, I found the following command in the upgrade branch:

    echo "no" | gosu www-data:www-data \
      php artisan passport:install --force
    

    This branch is selected whenever the database already contains tables, meaning it appears to run on normal application restarts as well as upgrades.
    As far as I understand, Laravel Passport's passport:install --force regenerates the OAuth signing keys, potentially invalidating previously issued access tokens.
    The echo "no" response does not appear to prevent key regeneration.
    This would explain why all browser extensions lose their authentication simultaneously after application updates or restarts.

    4. Suggested correction

    Could you please review whether passport:install --force is necessary on every startup of an existing installation?
    It seems that OAuth keys should only be generated during initial installation, or when genuinely missing, while preserving existing keys during subsequent restarts and upgrades.
    I have not yet performed a before-and-after key fingerprint comparison, but the startup script, key modification timestamps, and authentication failures strongly suggest this is the root cause.
    Would you be able to investigate and confirm whether this behavior is expected?

    Thank you for your work on Cloudron and for your assistance.

    Best regards.

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search