Skip to content

refactor: use x-tinyauth-location header and remove dupe auth modules in tinyauth auth request - #621

Open
steveiliop56 wants to merge 8 commits into
linuxserver:masterfrom
steveiliop56:refactor/x-tinyauth-location
Open

refactor: use x-tinyauth-location header and remove dupe auth modules in tinyauth auth request#621
steveiliop56 wants to merge 8 commits into
linuxserver:masterfrom
steveiliop56:refactor/x-tinyauth-location

Conversation

@steveiliop56

@steveiliop56 steveiliop56 commented Jul 18, 2026

Copy link
Copy Markdown

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Tinyauth introduced a new X-Tinyauth-Location header in the v5.0.7 version. This header allows Tinyauth to inform the reverse proxy of the location it wants the user to redirect to, avoiding the need for the custom Tinyauth login page location. It also allows for the proxy to redirect to Tinyauth's own pages for unauthorized users instead of presenting them the generic 403 error of Nginx.

Additionally, Tinyauth v5.2.0 introduced a security check to prevent the use of both the forward_auth (X-Forwarded-Host, X-Forwarded-URI) and auth_request (X-Original-URL) headers that prevents the current setup from working. This pull request, disables the forward_auth headers for the Tinyauth locations.

Benefits of this PR and context:

See above.

How Has This Been Tested?

This change will impact any users who update to this newer configuration while being on an version prior to v5.2.0. This exact patch was tested with Tinyauth's users and confirmed working as expected. Exact setups unknown.

If I understand correctly, it's the user's responsibility to review proxy configurations and apply them. However if you would like to avoid any potential confusion/potential breakage of any existing setups, I recommend at least adding a login_for=app parameter in the Tinyauth login location. This additional parameter informs the Tinyauth of the scope of the login request and helps increase security. Tinyauth can work without this parameter.

As for the proxy authentication headers, it's mandatory that part of this PR that addresses them gets merged else users with the current config will start getting 500 errors the moment they update Tinyauth to v5.2.0.

Source / References:

Release adding the header: https://github.com/tinyauthapp/tinyauth/releases/tag/v5.0.7
Release adding the new security check: https://github.com/tinyauthapp/tinyauth/releases/tag/v5.2.0
Documentation on Nginx Proxy Manager with this header: https://tinyauth.app/docs/guides/nginx-proxy-manager

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@steveiliop56

Copy link
Copy Markdown
Author

Don't close this bot.

@steveiliop56 steveiliop56 changed the title refactor: use x-tinyauth-location header in tinyauth auth request refactor: use x-tinyauth-location header and remove dupe auth modules in tinyauth auth request Sep 7, 2026
@drizuid drizuid added work-in-progress Stale exempt and removed no-pr-activity labels Sep 7, 2026
Comment thread root/defaults/nginx/tinyauth-proxy.conf.sample Outdated
@steveiliop56
steveiliop56 requested a review from quietsy September 8, 2026 17:31
@LinuxServer-CI LinuxServer-CI moved this from PRs to PRs Ready For Team Review in Issue & PR Tracker Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

work-in-progress Stale exempt

Projects

Status: PRs Ready For Team Review

Development

Successfully merging this pull request may close these issues.

4 participants