mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-05-21 10:51:30 +00:00
Fix OpenID logout redirect URI for subfolder deployments
This commit is contained in:
parent
47457ee1e7
commit
0331ca1441
1 changed files with 3 additions and 3 deletions
|
|
@ -396,9 +396,9 @@ class OidcAuthStrategy {
|
||||||
if (authMethod === 'openid') {
|
if (authMethod === 'openid') {
|
||||||
const protocol = req.secure || req.get('x-forwarded-proto') === 'https' ? 'https' : 'http'
|
const protocol = req.secure || req.get('x-forwarded-proto') === 'https' ? 'https' : 'http'
|
||||||
const host = req.get('host')
|
const host = req.get('host')
|
||||||
// TODO: ABS does currently not support subfolders for installation
|
const hostUrl = new URL(`${protocol}://${host}`)
|
||||||
// If we want to support it we need to include a config for the serverurl
|
const subfolder = global.ServerSettings.authOpenIDSubfolderForRedirectURLs || ''
|
||||||
postLogoutRedirectUri = `${protocol}://${host}${global.RouterBasePath}/login`
|
postLogoutRedirectUri = new URL(`${subfolder}/login`, hostUrl).toString()
|
||||||
}
|
}
|
||||||
// else for openid-mobile we keep postLogoutRedirectUri on null
|
// else for openid-mobile we keep postLogoutRedirectUri on null
|
||||||
// nice would be to redirect to the app here, but for example Authentik does not implement
|
// nice would be to redirect to the app here, but for example Authentik does not implement
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue