Fix guest join flow redirecting to Care marketing page.
Deploy Ladill Meet / deploy (push) Successful in 52s

Guests were sent through silent SSO after entering the meeting room because
/room routes required auth; failed SSO fell back to leftover Care config.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-01 12:05:41 +00:00
co-authored by Cursor
parent 08c4974a31
commit ba77acdb9d
7 changed files with 95 additions and 46 deletions
@@ -88,7 +88,11 @@ class SsoLoginController extends Controller
if ($request->filled('error')) {
if (in_array($request->query('error'), ['login_required', 'interaction_required', 'consent_required'], true)
&& ! $request->boolean('interactive')) {
return redirect()->away((string) config('ladill.marketing_url'));
return redirect()->route('sso.connect', [
'redirect' => $intended,
'interactive' => 1,
'fallback' => 1,
]);
}
return $this->finishCallback($request, $intended, (string) $request->query('error_description', $request->query('error')));
@@ -285,6 +289,10 @@ class SsoLoginController extends Controller
private function resolveLanding(IdentityTeamClient $identity, User $user, string $intended): string
{
if ($this->isMeetJoinUrl($intended)) {
return $intended;
}
try {
return $identity->postAuthRedirect($user->ownerRef(), $intended);
} catch (\Throwable) {
@@ -292,6 +300,14 @@ class SsoLoginController extends Controller
}
}
private function isMeetJoinUrl(string $url): bool
{
$meetHost = config('app.meet_domain', 'meet.ladill.com');
return str_starts_with($url, 'https://'.$meetHost.'/r/')
|| str_starts_with($url, 'http://'.$meetHost.'/r/');
}
private function safeReturnUrl(string $url): string
{
$host = parse_url($url, PHP_URL_HOST);