fix(authentik): allow ABS /audiobookshelf-prefixed OIDC callbacks
Current Audiobookshelf serves under /audiobookshelf, so it sends /audiobookshelf/auth/openid/callback, which Authentik rejected. Add the prefixed callback + mobile-redirect URIs, and have setup-books-auth.py sync redirect URIs on existing providers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e1fd7acce9
commit
6d8d34d996
2 files changed
+8
-1
No files matched your search
@@ -70,6 +70,9 @@ OIDC = [
|
||||
redirect("https://chaptarr.ginnoir.com/signin-oidc"),
|
||||
]),
|
||||
("audiobooks", "Audiobookshelf", "audiobooks.ginnoir.com", "ABS_OIDC", [
|
||||
# ABS 2.2x+ serves under /audiobookshelf; keep the unprefixed pair too.
|
||||
redirect("https://audiobooks.ginnoir.com/audiobookshelf/auth/openid/callback"),
|
||||
redirect("https://audiobooks.ginnoir.com/audiobookshelf/auth/openid/mobile-redirect"),
|
||||
redirect("https://audiobooks.ginnoir.com/auth/openid/callback"),
|
||||
redirect("https://audiobooks.ginnoir.com/auth/openid/mobile-redirect"),
|
||||
redirect("audiobookshelf://oauth"),
|
||||
@@ -92,6 +95,10 @@ for slug, app_name, host, prefix, uris in OIDC:
|
||||
)
|
||||
if created:
|
||||
p.property_mappings.set(SCOPES)
|
||||
if p._redirect_uris != uris:
|
||||
p._redirect_uris = uris
|
||||
p.save()
|
||||
print(f"OIDC {slug}: redirect URIs updated")
|
||||
Application.objects.update_or_create(
|
||||
slug=slug,
|
||||
defaults=dict(name=app_name, provider=p, meta_launch_url=f"https://{host}"),
|
||||
|
||||
Reference in new issue
Block a user