Hi guys,
I'm new on Flarum and I have to work on a project where they use this SSO extension.
They also use the Embed extension which I found about here, on a Flarum discussion.
What it does is that you can display a discussion in an iFrame, on another website using an URL like that : http://www.mysite.com/embed/2-my-discussion
The problem is that when SSO extension is enabled, the embed URL doesn't work.
It throws this error : throw new RouteNotFoundException($uri);
Any ideas of what could cause that ? Or where to start looking ?
Thanks for your help.
More details here :
/var/www/vendor/flarum/core/src/Http/Middleware/ResolveRoute.php
/**
* Resolve the given request from our route collection.
*
* @throws MethodNotAllowedException
* @throws RouteNotFoundException
*/
public function process(Request $request, Handler $handler): Response
{
$method = $request->getMethod();
$uri = $request->getUri()->getPath() ?: '/';
$routeInfo = $this->getDispatcher()->dispatch($method, $uri);
switch ($routeInfo[0]) {
case Dispatcher::NOT_FOUND:
throw new RouteNotFoundException($uri); // <<<< the error
case Dispatcher::METHOD_NOT_ALLOWED:
throw new MethodNotAllowedException($method);
case Dispatcher::FOUND:
$request = $request
->withAttribute('routeName', $routeInfo[1]['name'])
->withAttribute('routeHandler', $routeInfo[1]['handler'])
->withAttribute('routeParameters', $routeInfo[2]);
return $handler->handle($request);
}