I’m working on creating a Jira Cloud Connect application using Laravel 11, but I keep running into a session error during the installation process.
The specific error message I’m getting is:
local.ERROR: Session store not set on request
This happens when Jira tries to install my connect app. I’m pretty new to Laravel 11 so I might be missing something obvious.
Here’s my setup controller (SetupHandler.php):
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Installation;
use Illuminate\Support\Facades\Log;
class SetupHandler extends Controller
{
public function handleInstall(Request $request)
{
$appKey = $request->input('clientKey');
$jiraUrl = $request->input('baseUrl');
Log::info('New installation attempt', $request->all());
$installation = new Installation();
$installation->app_key = $appKey;
$installation->jira_url = $jiraUrl;
try {
$installation->save();
} catch (\Exception $error) {
Log::error('Installation save failed: ' . $error->getMessage());
return response()->json(['result' => 'failed', 'error' => 'Could not save installation'], 500);
}
return response()->json(['result' => 'success']);
}
}
My routes file (web.php):
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\SetupHandler;
use App\Http\Middleware\VerifyCsrfToken;
Route::get('/', function () {
return view('welcome');
});
Route::post('/setup', [SetupHandler::class, 'handleInstall'])
->middleware(VerifyCsrfToken::class);
CSRF middleware configuration:
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
protected $except = [
'/app/public/setup',
];
}
My ngrok tunnel shows this error: POST /app/public/setup 419 unknown status
What am I doing wrong here? Any help would be great since I’m still learning Laravel 11.