承接 wapplersystems/multisite-belogin 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wapplersystems/multisite-belogin

Composer 安装命令:

composer require wapplersystems/multisite-belogin

包简介

Cross site/domain backend login for TYPO3. It allows backend users to work in the frontend across domains.

README 文档

README

TYPO3 extension for automatic cross-domain backend login. Allows editors to use backend tools (e.g. frontend preview) across all configured site domains without separate login per domain.

Requirements

  • TYPO3 v14+
  • PHP 8.2+
  • Backend must be accessed via HTTPS

Installation

composer require wapplersystems/multisite-belogin

Add the refresh GET parameter to the cacheHash exclusion list in config/system/settings.php:

$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'refresh';

How it works

When an editor clicks "View page" in the TYPO3 backend, the target page may be on a different domain than the backend. Without this extension, the editor would not be authenticated on that domain and could not see unpublished content or use the admin panel.

This extension solves this by:

  1. Token generation -- When the editor triggers a frontend preview, a short-lived token (60s TTL) is generated and stored in the backend session.
  2. Redirect -- The preview URL is rewritten to pass through the token authentication endpoint (/typo3/msbl/tokenauth) with the token, user ID, and original target URL.
  3. Token validation -- The middleware intercepts the request, validates the token against the stored session data, and authenticates the user.
  4. Cookie propagation -- A backend session cookie with SameSite=None is set on the response, enabling cross-domain authentication.
  5. Redirect to target -- The editor is redirected to the original preview URL, now fully authenticated.

Architecture

Authentication flow

Backend (domain-a.com)                    Frontend (domain-b.com)
        |                                         |
        |  1. Editor clicks "View page"           |
        |  2. Token generated + stored in session  |
        |  3. Redirect to /typo3/msbl/tokenauth   |
        |         with ?msblToken=...&userid=...   |
        |  ─────────────────────────────────────>  |
        |                                         |  4. Middleware validates token
        |                                         |  5. BE session cookie set
        |                                         |  6. Redirect to target page
        |                                         |

Components

Component Description
TokenGenerator Generates 40-char random hex tokens via TYPO3\CMS\Core\Crypto\Random
TokenAuthenticationService TYPO3 auth service (subtype: getUserBE,authUserBE) that validates tokens against stored sessions
TokenLoginAuthenticator PSR-15 middleware on /typo3/msbl/tokenauth -- validates token, sets session cookie, redirects
LoginController Backend route /msbl/redirectToFrontend -- generates token, stores in session, builds redirect URL
TokenController Backend route for programmatic token generation (JSON API)
AfterPagePreviewUriGeneratedEventListener Rewrites preview URIs to route through the token auth endpoint
BeforeUserLogoutEventListener On logout: removes all other sessions for the user
AfterUserLoggedOutEventListener On logout: cleanup of all remaining sessions
UserSessionManager Extends core UserSessionManager to expose the session backend for direct session access

Configuration files

File Purpose
Configuration/Backend/Routes.php Registers /msbl/redirectToFrontend and /msbl/tokenauth backend routes
Configuration/RequestMiddlewares.php Registers TokenLoginAuthenticator before backend routing
Configuration/Services.yaml DI config + event listener registration
Configuration/Icons.php Toolbar and module icons

Security considerations

  • Tokens are cryptographically random (40-char hex)
  • Tokens expire after 60 seconds
  • Token validation uses safe unserialize() with allowed_classes: false
  • Session cookies are set with SameSite=None (requires HTTPS)
  • Failed login attempts are logged via PSR-3 logger

License

GPL-2.0-or-later

wapplersystems/multisite-belogin 适用场景与选型建议

wapplersystems/multisite-belogin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 36.96k 次下载、GitHub Stars 达 9, 最近一次更新时间为 2023 年 08 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「backend」 「extension」 「login」 「multisite」 「typo3」 「cross domain」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 wapplersystems/multisite-belogin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 wapplersystems/multisite-belogin 我们能提供哪些服务?
定制开发 / 二次开发

基于 wapplersystems/multisite-belogin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 36.96k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 10
  • 点击次数: 15
  • 依赖项目数: 1
  • 推荐数: 1

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2023-08-19