fix: cross-subdomain SSO auto-login for *arr services
- Set Domain=.sami on session + CSRF cookies so browsers send them to all subdomains - This fixes Caddy forward_auth returning 401 for radarr/sonarr/prowlarr - Fix login URL concatenation bug (radarr.samilogin -> radarr.sami/login) - Fix getSetCookie() missing from _httpsFetch/_httpFetch response objects - Fix array/string handling for set-cookie header in session-handlers fallback - Refactor csrf-protection to createCSRFMiddleware() factory with cookieDomain support - Pass renewCSRFToken through middleware deps chain to TOTP route
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
const express = require('express');
|
||||
const { renewCSRFToken } = require('../../csrf-protection');
|
||||
const { ValidationError, AuthenticationError } = require('../../errors');
|
||||
|
||||
/**
|
||||
@@ -15,7 +14,7 @@ const { ValidationError, AuthenticationError } = require('../../errors');
|
||||
* @param {Object} deps.log - Logger instance
|
||||
* @returns {express.Router}
|
||||
*/
|
||||
module.exports = function({ authManager, credentialManager, totpConfig, saveTotpConfig, session, asyncHandler, errorResponse, log }) {
|
||||
module.exports = function({ authManager, credentialManager, totpConfig, saveTotpConfig, session, asyncHandler, errorResponse, log, renewCSRFToken }) {
|
||||
const router = express.Router();
|
||||
|
||||
// Ctx shim for backward compatibility
|
||||
|
||||
Reference in New Issue
Block a user