As you know the Dashboard app can set User directly. So in the index.php you can do something like this:
<?php
require_once "vendor/autoload.php";
require_once "/path/to/App.php";
use \koolreport\dashboard\User;
$app = App::create();
// Now, you make any request to your web app to get user identity
$userInfo = getUserInfoFromYourWebApp();
// If you retrieve correct $userInfo then you create User identity for Dashboard
if($userInfo)
{
$user = User::create()
->id($userInfo["id"])
->name($userInfo["name"])
->avatar($userInfo["avatar"])
->roles($userInfo["role"]);
//The id and name are the most important info, others are optional.
$app->user($user); //Set the user to app.
}
// Lastly, you run the app as normal
$app->run();
So the logic is, if you found the user has login in your web app, then you set the dashboard with that user info, the dashboard will bypass the login authentication. If userInfo is null, meaning user has not login, the login authentication page will be shown in dashboard for user to login.
Here is reference from our documentation:
https://www.koolreport.com/docs/dashboard/application/#authentication-set-user-directly
Hope that helps.