Redirect URI Error #961

Closed
opened 2026-04-24 23:44:21 +02:00 by adam · 9 comments
Owner

Originally created by @skyzuma on GitHub (May 4, 2024).

ive work on "OAuth2/OpenID Provider" with authentik and ABS (nginx proxy manager is usung in the background but i think this is not relevant). ive completed the part in authentik

https://github.com/advplyr/audiobookshelf/issues/998#issuecomment-2093636215

and i can login with "Login with OpenId" in any webbrowser but if i try login with the android (v14 / SM-F731B) app v0.9.73-beta by pressing "Login with OpenId", this error is comming

Screenshot_20240504_110802

is the implementaion not completed or do i an mistake?

Originally created by @skyzuma on GitHub (May 4, 2024). ive work on "OAuth2/OpenID Provider" with authentik and ABS (nginx proxy manager is usung in the background but i think this is not relevant). ive completed the [part](https://github.com/advplyr/audiobookshelf/issues/998#issuecomment-1819939587) in authentik https://github.com/advplyr/audiobookshelf/issues/998#issuecomment-2093636215 and i can login with "Login with OpenId" in any webbrowser but if i try login with the android (v14 / SM-F731B) app v0.9.73-beta by pressing "Login with OpenId", this error is comming ![Screenshot_20240504_110802](https://github.com/advplyr/audiobookshelf-app/assets/1676196/9b86a472-99b5-4476-bfc0-a035977471f0) is the implementaion not completed or do i an mistake?
adam closed this issue 2026-04-24 23:44:21 +02:00
Author
Owner

@skyzuma commented on GitHub (May 4, 2024):

i think the solution is

https://github.com/advplyr/audiobookshelf/pull/2386

add "https://absurl/auth/openid/mobile-redirect" to the authentik provider entry where the other entrys are ...

@skyzuma commented on GitHub (May 4, 2024): i think the solution is https://github.com/advplyr/audiobookshelf/pull/2386 add "https://absurl/auth/openid/mobile-redirect" to the authentik provider entry where the other entrys are ...
Author
Owner

@skyzuma commented on GitHub (May 4, 2024):

i think an complete step by step guide is needed .... i found the pieces one by one but all we need all informations in one place

@skyzuma commented on GitHub (May 4, 2024): i think an complete step by step guide is needed .... i found the pieces one by one but all we need all informations in one place
Author
Owner

@nichwall commented on GitHub (May 4, 2024):

i think an complete step by step guide is needed .... i found the pieces one by one but all we need all informations in one place

You can help update documentation if steps are missing. https://github.com/audiobookshelf/audiobookshelf-web/blob/master/content%2Fguides%2F11.oidc_authentication.md

@nichwall commented on GitHub (May 4, 2024): > i think an complete step by step guide is needed .... i found the pieces one by one but all we need all informations in one place You can help update documentation if steps are missing. https://github.com/audiobookshelf/audiobookshelf-web/blob/master/content%2Fguides%2F11.oidc_authentication.md
Author
Owner

@Guruleenyc commented on GitHub (Jun 23, 2025):

I have the same issue with Authentik and I have both these regext request_uri in place:
https://<mydomain.com>/auth/openid/callback
https://<mydomain.com>/auth/openid/mobile-redirect

Any ideas?

@Guruleenyc commented on GitHub (Jun 23, 2025): I have the same issue with Authentik and I have both these regext request_uri in place: https://<mydomain.com>/auth/openid/callback https://<mydomain.com>/auth/openid/mobile-redirect Any ideas?
Author
Owner

@Guruleenyc commented on GitHub (Jun 24, 2025):

Experiencing same issue here.

@Guruleenyc commented on GitHub (Jun 24, 2025): Experiencing same issue here.
Author
Owner

@unraidcitadel commented on GitHub (Jul 23, 2025):

Encountering the same thing here. Been battling this one for a few hours now and nothing.

@unraidcitadel commented on GitHub (Jul 23, 2025): Encountering the same thing here. Been battling this one for a few hours now and nothing.
Author
Owner

@Shadowghost commented on GitHub (Jul 29, 2025):

Your issues are likely caused by a bad proxy configuration. Audiobookshelf creates the redirection URL sent to the OIDC provider based off the X-Forwarded-Proto and Host headers sent to the container.
@advplyr maybe it would be beneficial to have a dedicated setting for configuring the external URL to use in such cases.

I ran into this because I have a proxy chain which terminates TLS in the first proxy, leading to the protocol being forwarded to audiobookshelf being http instead of https.

@Shadowghost commented on GitHub (Jul 29, 2025): Your issues are likely caused by a bad proxy configuration. Audiobookshelf creates the redirection URL sent to the OIDC provider based off the `X-Forwarded-Proto` and `Host` headers sent to the container. @advplyr maybe it would be beneficial to have a dedicated setting for configuring the external URL to use in such cases. I ran into this because I have a proxy chain which terminates TLS in the first proxy, leading to the protocol being forwarded to audiobookshelf being http instead of https.
Author
Owner

@pawcza commented on GitHub (Dec 18, 2025):

Encountering the same. It would be beneficial if it was possible to configure the external URL. Had to disable Cloudflare proxy for this subdomain to make it work.

@pawcza commented on GitHub (Dec 18, 2025): Encountering the same. It would be beneficial if it was possible to configure the external URL. Had to disable Cloudflare proxy for this subdomain to make it work.
Author
Owner

@Jammrock commented on GitHub (Jan 30, 2026):

I may have figured out the issue with Authentik users using this community guide:

https://integrations.goauthentik.io/media/audiobookshelf/

TL;DR - Set Subfolder for Redirect URLs to None. The redirect error should go away.

ABS defaults to using a subfolder for the redirect URL. Which is not how I, and probably many users, have their reverse proxy setup. We use a subdomain instead (abs.company.domain instead of company.domian/audiobookshelf).

Image

The Authentik guide does not mention this option. So when you setup Authentik and miss the importance of this setting, you create a redirect URL without a subfolder when ABS expects a subfolder in the URL.

Image

EDIT: I have attempted to update the Authentik guide. Their PR process is not trivial so uh... I may have messed something up. Here's the PR if in case it fails and someone with more know-how can try to merge it.

https://github.com/goauthentik/authentik/pull/19882

@Jammrock commented on GitHub (Jan 30, 2026): I may have figured out the issue with Authentik users using this community guide: https://integrations.goauthentik.io/media/audiobookshelf/ TL;DR - Set `Subfolder for Redirect URLs` to `None`. The redirect error should go away. ABS defaults to using a subfolder for the redirect URL. Which is not how I, and probably many users, have their reverse proxy setup. We use a subdomain instead (`abs.company.domain` instead of `company.domian/audiobookshelf`). <img width="785" height="167" alt="Image" src="https://github.com/user-attachments/assets/542ba382-6adc-4bcc-971e-364d2c066caa" /> The Authentik guide does not mention this option. So when you setup Authentik and miss the importance of this setting, you create a redirect URL without a subfolder when ABS expects a subfolder in the URL. <img width="1268" height="243" alt="Image" src="https://github.com/user-attachments/assets/e2939445-d3c8-47b7-91a1-bd32f087c009" /> EDIT: I have attempted to update the Authentik guide. Their PR process is not trivial so uh... I may have messed something up. Here's the PR if in case it fails and someone with more know-how can try to merge it. https://github.com/goauthentik/authentik/pull/19882
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#961