This package allows you to use jsConnect of Vanilla Forums in your Laravel 5 application and is a fork of pdefreitas/vanillasso.
SSO (Single Sign-on) will save your time if you want to implement a forum on your Laravel 5 application.
The package is availabe on Packagist https://packagist.org/packages/reliqarts/vanillasso
-
Install via composer; in console:
composer require reliqarts/vanillasso
or require in composer.json:
{ "require": { "reliqarts/vanillasso": "dev-master" } }
then run
composer update
in your terminal to pull it in. -
Edit the providers array in app.php (app/config/app.php)
'providers' => [ // ... 'ReliQArts\VanillaSSO\VanillaSSOServiceProvider', // ... ],
-
Publish the vanillasso.php config file to make it accessible in app/config/packages/reliqarts/vanillasso/vanillasso.php
php artisan config:publish reliqarts/vanillasso
An endpoint is automatically set based on your config. Default endpoint is: login/forum
.
You can directly edit config\vanillasso.php or add it to your application.
The configuration file looks like this:
return [
// The string client ID that you set up in the jsConnect settings page.
"client_id" => "",
// The string secred that you set up in the jsConnect settings page.
"secret" => "",
// Endpoint
"endpoint" => "",
// User profile pic url.
"profile_pic_url" => "http://mysite.dev/profile/pic/{user_id}",
// Route related options.
'routes' => [
// Set the bindings for vanillasso
'bindings' => [
'middleware' => [
'web',
'auth',
]
]
],
];
Please note that this plugin supports MD5 and SHA1 hashes from JSconnect.
Check LICENSE for more information.
I want to thank Todd Burry from Vanilla Forums. This file helped producing this package: https://github.com/vanilla/jsConnectPHP/blob/master/functions.jsconnect.php
If you use Vanilla 2.1 there is an annoying bug that you have to alter a table in order to jsConnect 1.4.1 be supported:
ALTER TABLE GDN_UserAuthenticationProvider ADD IsDefault BOOLEAN NOT NULL DEFAULT FALSE;