WebEngine CMS

Live & working

Login con TuServerMU for WebEngine

A drop-in plugin for WebEngine CMS 1.2.x. It adds a “Login con TuServerMU” button, links a player's existing game account by email, or provisions a new MEMB_INFO account the first time, and logs them in. It reuses WebEngine's own database layer, password-encryption setting and login session, so it respects your server's configuration. Tested end-to-end and working on a real WebEngine + MSSQL install.

Download the plugin

5 drop-in files for your modules/ folder. Install in minutes.

tuservermu-sso-webengine.zip

1 Register your app

Open Account → OAuth apps and create a Confidential app. Set the redirect URI to your callback URL:

https://your-site.com/ssocallback/

Copy the client_id and client_secret.

2 Install the files

Unzip and copy these five files into your WebEngine modules/ directory:

modules/tsm_sso_config.php
modules/tsm_sso_lib.php
modules/ssologin.php
modules/ssocallback.php
modules/ssosetup.php

3 Configure

Edit modules/tsm_sso_config.php:

'client_id'     => 'YOUR_CLIENT_ID',
'client_secret' => 'YOUR_CLIENT_SECRET',
'redirect_uri'  => 'https://your-site.com/ssocallback/',  // must match exactly
'post_login'    => '/',                                   // where to land after login

4 Add the button

Drop this into your login template:

<a href="/ssologin/" class="btn">Login con TuServerMU</a>

No pretty URLs? Link to index.php?page=ssologin and register the redirect URI as .../index.php?page=ssocallback.

How it works

  • /ssologin/ - sends the player to TuServerMU (Authorization Code + PKCE).
  • /ssocallback/ - validates state, exchanges the code, reads the profile. If the email matches an existing MEMB_INFO account it logs them in; otherwise it goes to setup.
  • /ssosetup/ - the player picks a game username and password (≤10 chars, the ones they type in the game client); the account is created and they're logged in.

The TuServerMU master password (bcrypt + 2FA) never touches your database. The game password is a separate, low-value MEMB_INFO secret the player controls. Provisioning writes memb__pwd using your SQL_PASSWORD_ENCRYPTION setting and sets bloc_code = 0, ctl1_code = 0.

Questions? [email protected] · Full OIDC docs

Latest across the ecosystem