mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-11-16 22:01:17 +01:00
Update protocol for redirect_uri in openid strategy to work for reverse proxies
This commit is contained in:
1 parent
89eb857c14
commit
dcbfc963c1
1 file changed
+2
-1
+2
-1
@@ -282,7 +282,8 @@ class Auth {
|
||||
// We need to call the client manually, because the strategy does not support forwarding the code challenge
|
||||
// for API or mobile clients
|
||||
const oidcStrategy = passport._strategy('openid-client')
|
||||
oidcStrategy._params.redirect_uri = new URL(`${req.protocol}://${req.get('host')}/auth/openid/callback`).toString()
|
||||
const protocol = req.secure ? 'https' : 'http'
|
||||
oidcStrategy._params.redirect_uri = new URL(`${protocol}://${req.get('host')}/auth/openid/callback`).toString()
|
||||
const client = oidcStrategy._client
|
||||
const sessionKey = oidcStrategy._key
|
||||
|
||||
|
||||
Reference in new issue
Block a user