Fix openid cb route name

This commit is contained in:
Chocobozzz 2020-04-30 15:40:52 +02:00
parent 65fdf71b17
commit 018d8e6224
No known key found for this signature in database
GPG Key ID: 583A612D890159BE

View File

@ -87,9 +87,9 @@ async function register ({
})
const router = getRouter()
router.use('/id-token-cb', (req, res) => handleCb(peertubeHelpers, settingsManager, req, res))
router.use('/code-cb', (req, res) => handleCb(peertubeHelpers, settingsManager, req, res))
store.redirectUrl = peertubeHelpers.config.getWebserverUrl() + '/plugins/auth-openid-connect/router/id-token-cb'
store.redirectUrl = peertubeHelpers.config.getWebserverUrl() + '/plugins/auth-openid-connect/router/code-cb'
const secretKeyBuf = await getRandomBytes(16)
store.secretKey = secretKeyBuf.toString('hex')
@ -161,9 +161,6 @@ async function loadSettingsAndCreateClient (registerExternalAuth, unregisterExte
store.client = new issuer.Client(clientOptions)
// We already registered this external auth
if (store.userAuthenticated) return
const webserverUrl = config.getWebserverUrl()
const result = registerExternalAuth({