[PR #1109] [CLOSED] Add support for forward proxy auth. Tested with authentik. #3446

Closed
opened 2026-04-25 00:15:41 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/1109
Author: @pgodwin
Created: 11/2/2022
Status: Closed

Base: masterHead: feat-forwardauth


📝 Commits (5)

  • b8d0395 Add support for forward proxy auth. Tested with authentik.
  • 8558baf Merge branch 'master' into feat-forwardauth
  • 73a6187 Forward Auth refactor and adding PROXY_FORWARD_AUTH_LOGOUT_URI env
  • ddce6ec Fix hashPass and remove error code return on authorize
  • 7b9e1cc Merge branch 'master' into feat-forwardauth

📊 Changes

9 files changed (+195 additions, -14 deletions)

View changed files

📝 client/pages/account.vue (+8 -3)
📝 client/pages/login.vue (+40 -8)
📝 client/store/user.js (+2 -0)
📝 readme.md (+11 -0)
📝 server/Auth.js (+92 -0)
📝 server/Server.js (+16 -1)
📝 server/controllers/MiscController.js (+6 -0)
📝 server/objects/user/User.js (+12 -2)
server/utils/parseBool.js (+8 -0)

📄 Description

This is small change to enable proxy forward authentication. This is useful for providers which can proxy authentication, and can be used a simple way of providing SSO to Autobookshelf.

Tested with Authentik. See details on https://goauthentik.io/docs/providers/proxy/, but supported by other reverse proxies. Eg traefik, caddy.

To use it with Authentik set the following variables:

export PROXY_FORWARD_AUTH_ENABLED=1
export PROXY_FORWARD_AUTH_USERNAME=X-authentik-username
export PROXY_FORWARD_AUTH_CREATE=1

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/1109 **Author:** [@pgodwin](https://github.com/pgodwin) **Created:** 11/2/2022 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feat-forwardauth` --- ### 📝 Commits (5) - [`b8d0395`](https://github.com/advplyr/audiobookshelf/commit/b8d0395e6d58a39b2ece6d3541ac2a8d5fbaea53) Add support for forward proxy auth. Tested with authentik. - [`8558baf`](https://github.com/advplyr/audiobookshelf/commit/8558baf30a7edf1cba8dedf3ab7d2eca2532085e) Merge branch 'master' into feat-forwardauth - [`73a6187`](https://github.com/advplyr/audiobookshelf/commit/73a61872fa6df9af6fa6f5acb9b7e13cd8d5fb63) Forward Auth refactor and adding PROXY_FORWARD_AUTH_LOGOUT_URI env - [`ddce6ec`](https://github.com/advplyr/audiobookshelf/commit/ddce6ec5b72799fc0f9c533cea7c482708596636) Fix hashPass and remove error code return on authorize - [`7b9e1cc`](https://github.com/advplyr/audiobookshelf/commit/7b9e1ccdb7acbcf7016b58cbecf9aa4d6c42fa21) Merge branch 'master' into feat-forwardauth ### 📊 Changes **9 files changed** (+195 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `client/pages/account.vue` (+8 -3) 📝 `client/pages/login.vue` (+40 -8) 📝 `client/store/user.js` (+2 -0) 📝 `readme.md` (+11 -0) 📝 `server/Auth.js` (+92 -0) 📝 `server/Server.js` (+16 -1) 📝 `server/controllers/MiscController.js` (+6 -0) 📝 `server/objects/user/User.js` (+12 -2) ➕ `server/utils/parseBool.js` (+8 -0) </details> ### 📄 Description This is small change to enable proxy forward authentication. This is useful for providers which can proxy authentication, and can be used a simple way of providing SSO to Autobookshelf. Tested with Authentik. See details on https://goauthentik.io/docs/providers/proxy/, but supported by other reverse proxies. Eg [traefik](https://doc.traefik.io/traefik/middlewares/http/forwardauth/), [caddy](https://caddyserver.com/docs/caddyfile/directives/forward_auth). To use it with Authentik set the following variables: ```bash export PROXY_FORWARD_AUTH_ENABLED=1 export PROXY_FORWARD_AUTH_USERNAME=X-authentik-username export PROXY_FORWARD_AUTH_CREATE=1 ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:15:41 +02:00
adam closed this issue 2026-04-25 00:15:41 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3446