Single file SSO client for Discourse in PHP (w/ PostgreSQL and logout)
Usage how to on Discourse Meta:
Related projects:
- MantisDiscourseSSO plugin repository
Here's a sample thing to put in LocalSettings.php
:
# Logout for authentication
define('SSO_LOGOUT_TOKEN', hash('sha512', $SSO_STATUS["nonce"]));
$wgAuthRemoteuserUserUrls = [
'logout' => function( $metadata ) {
return '/discourse-sso.php?logout=' . SSO_LOGOUT_TOKEN;
}
];