Send SSO guests to ladill.com/products/mini instead of subdomain landings.
Deploy Ladill Mini / deploy (push) Successful in 39s

Remove interactive OAuth fallback on silent SSO failure and add ladill.marketing_url config so app subdomains open the dashboard when signed in locally.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-12 22:21:52 +00:00
co-authored by Cursor
parent b952020890
commit df07b9731d
6 changed files with 10 additions and 181 deletions
@@ -88,10 +88,7 @@ class SsoLoginController extends Controller
if ($request->filled('error')) { if ($request->filled('error')) {
if (in_array($request->query('error'), ['login_required', 'interaction_required', 'consent_required'], true) if (in_array($request->query('error'), ['login_required', 'interaction_required', 'consent_required'], true)
&& ! $request->boolean('interactive')) { && ! $request->boolean('interactive')) {
return redirect()->route('sso.connect', [ return redirect()->away((string) config('ladill.marketing_url'));
'redirect' => $intended,
'interactive' => 1,
]);
} }
return $this->finishCallback($request, $intended, (string) $request->query('error_description', $request->query('error')), $popup); return $this->finishCallback($request, $intended, (string) $request->query('error_description', $request->query('error')), $popup);
@@ -1,31 +0,0 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\View\View;
class ProductLandingController extends Controller
{
public function show(Request $request): View|RedirectResponse
{
$landing = config('product_landing', []);
$variant = (string) ($landing['landing_variant'] ?? 'default');
$dashboardRoute = (string) ($landing['dashboard_route'] ?? 'login');
if ($variant === 'webmail') {
if ($request->session()->has('mb.email')) {
return redirect()->route($dashboardRoute);
}
return view('product.landing');
}
if (auth()->check()) {
return redirect()->route($dashboardRoute);
}
return view('product.landing');
}
}
+6
View File
@@ -0,0 +1,6 @@
<?php
return [
'product_slug' => 'mini',
'marketing_url' => env('LADILL_MARKETING_URL', 'https://localhost/products/mini'),
];
-43
View File
@@ -1,43 +0,0 @@
<?php
return [
'slug' => 'mini',
'name' => 'Mini',
'logo' => 'images/logo/ladillmini-logo.svg',
'icon' => 'mini.svg',
'tagline' => 'Simple payment collection',
'headline' => 'Collect payments without a full storefront',
'accent' => 'quick pay links and QR takings',
'description' => 'Mini is the fastest way to get paid. Create payment requests, share links, and track takings — perfect when you don\'t need a full online store.',
'benefits' =>
[
0 =>
[
'title' => 'Payment links in seconds',
'text' => 'Send a link by WhatsApp, SMS, or email and get paid immediately.',
],
1 =>
[
'title' => 'QR-friendly',
'text' => 'Print or display a code for in-person collections.',
],
2 =>
[
'title' => 'Lightweight setup',
'text' => 'No catalog required — just amount, description, and pay.',
],
],
'use_cases' =>
[
0 => 'Freelancers',
1 => 'Pop-up sales',
2 => 'Deposits & invoices',
],
'gradient_from' => '#4f46e5',
'gradient_to' => '#1c75bc',
'dashboard_route' => 'mini.dashboard',
'platform_url' => 'https://localhost',
'marketing_url' => 'https://localhost/products/mini',
'register_url' => 'https://auth.localhost/register',
'landing_variant' => 'default',
];
-101
View File
@@ -1,101 +0,0 @@
@php
$landing = (array) config('product_landing');
$logo = (string) ($landing['logo'] ?? '');
$logoPath = $logo !== '' ? public_path($logo) : null;
$platformUrl = (string) ($landing['platform_url'] ?? 'https://ladill.com');
$marketingUrl = (string) ($landing['marketing_url'] ?? $platformUrl);
$signInUrl = route('sso.connect', [
'redirect' => route($landing['dashboard_route'] ?? 'login'),
'interactive' => 1,
]);
$variant = (string) ($landing['landing_variant'] ?? 'default');
@endphp
<!DOCTYPE html>
<html lang="en" class="h-full">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>{{ $landing['name'] ?? config('app.name') }} Ladill</title>
<meta name="description" content="{{ $landing['description'] ?? '' }}">
@include('partials.favicon')
<link rel="canonical" href="{{ $marketingUrl }}">
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600,700&display=swap" rel="stylesheet" />
@vite(['resources/css/app.css'])
</head>
<body class="min-h-screen bg-slate-950 font-sans text-white antialiased">
<div class="pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(28,117,188,.35),transparent_50%),radial-gradient(circle_at_bottom_right,rgba(217,236,103,.12),transparent_45%)]"></div>
<header class="relative z-10 border-b border-white/10">
<div class="mx-auto flex max-w-6xl items-center justify-between gap-4 px-4 py-4 sm:px-6">
@if ($logo !== '')
<img src="{{ asset($logo) }}?v={{ $logoPath && is_file($logoPath) ? filemtime($logoPath) : '1' }}"
alt="{{ $landing['name'] ?? config('app.name') }}"
class="h-7 w-auto">
@else
<span class="text-sm font-semibold">{{ $landing['name'] ?? config('app.name') }}</span>
@endif
<div class="flex items-center gap-2">
<a href="{{ $platformUrl }}" class="hidden rounded-lg px-3 py-2 text-sm font-medium text-slate-300 transition hover:text-white sm:inline-flex">ladill.com</a>
<a href="{{ $signInUrl }}" class="rounded-lg border border-white/20 px-4 py-2 text-sm font-semibold text-white transition hover:bg-white/10">Sign in</a>
</div>
</div>
</header>
<main class="relative z-10 mx-auto max-w-6xl px-4 py-12 sm:px-6 sm:py-16">
<div class="grid items-center gap-12 lg:grid-cols-2">
<div>
<p class="text-sm font-semibold uppercase tracking-wider text-[#d9ec67]">{{ $landing['tagline'] ?? '' }}</p>
<h1 class="mt-4 text-4xl font-bold tracking-tight sm:text-5xl">{{ $landing['headline'] ?? ($landing['name'] ?? '') }}</h1>
<p class="mt-5 text-base leading-relaxed text-slate-300 sm:text-lg">{{ $landing['description'] ?? '' }}</p>
<div class="mt-8 flex flex-wrap gap-3">
<a href="{{ $signInUrl }}" class="inline-flex items-center justify-center rounded-xl bg-[#d9ec67] px-6 py-3.5 text-sm font-bold text-slate-950 transition hover:bg-[#e5f278]">
{{ $variant === 'webmail' ? 'Sign in to webmail' : 'Get started' }}
</a>
@if ($variant === 'webmail')
<a href="{{ route('webmail.login.manual') }}" class="inline-flex items-center justify-center rounded-xl border border-white/20 px-6 py-3.5 text-sm font-semibold text-white transition hover:bg-white/10">
Manual login
</a>
@else
<a href="{{ $landing['register_url'] ?? $platformUrl.'/register' }}" class="inline-flex items-center justify-center rounded-xl border border-white/20 px-6 py-3.5 text-sm font-semibold text-white transition hover:bg-white/10">
Create account
</a>
@endif
</div>
<p class="mt-5 text-sm text-slate-400">
<a href="{{ $marketingUrl }}" class="font-medium text-slate-200 underline decoration-white/20 underline-offset-2 hover:text-white">Learn more on ladill.com</a>
</p>
</div>
<div class="rounded-3xl border border-white/10 bg-white/5 p-6 backdrop-blur sm:p-8">
<p class="text-xs font-semibold uppercase tracking-wider text-slate-400">Why {{ $landing['name'] ?? 'Ladill' }}</p>
<div class="mt-5 space-y-4">
@foreach (($landing['benefits'] ?? []) as $benefit)
<div class="rounded-2xl border border-white/10 bg-slate-950/40 p-4">
<h2 class="text-sm font-semibold text-white">{{ $benefit['title'] }}</h2>
<p class="mt-1.5 text-sm leading-relaxed text-slate-400">{{ $benefit['text'] }}</p>
</div>
@endforeach
</div>
@if (! empty($landing['use_cases']))
<div class="mt-6 border-t border-white/10 pt-6">
<p class="text-xs font-semibold uppercase tracking-wider text-slate-400">Ideal for</p>
<div class="mt-3 flex flex-wrap gap-2">
@foreach ($landing['use_cases'] as $useCase)
<span class="rounded-full border border-white/10 bg-white/5 px-3 py-1 text-xs font-medium text-slate-200">{{ $useCase }}</span>
@endforeach
</div>
</div>
@endif
</div>
</div>
</main>
<footer class="relative z-10 border-t border-white/10 py-6 text-center text-xs text-slate-500">
Part of the <a href="{{ $platformUrl }}" class="font-medium text-slate-300 hover:text-white">Ladill</a> platform one account for every app.
</footer>
</body>
</html>
+3 -2
View File
@@ -1,6 +1,5 @@
<?php <?php
use App\Http\Controllers\ProductLandingController;
use App\Http\Controllers\Auth\SsoLoginController; use App\Http\Controllers\Auth\SsoLoginController;
use App\Http\Controllers\Mini\OverviewController; use App\Http\Controllers\Mini\OverviewController;
use App\Http\Controllers\Mini\PaymentQrController; use App\Http\Controllers\Mini\PaymentQrController;
@@ -15,7 +14,9 @@ use App\Http\Controllers\Qr\TeamController;
use App\Http\Controllers\SearchController; use App\Http\Controllers\SearchController;
use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Route;
Route::get('/', [ProductLandingController::class, 'show'])->name('mini.landing'); Route::get('/', fn () => auth()->check()
? redirect()->route('mini.dashboard')
: redirect()->route('sso.connect'))->name('mini.root');
Route::get('/login', [SsoLoginController::class, 'connect'])->name('login'); Route::get('/login', [SsoLoginController::class, 'connect'])->name('login');
Route::get('/sso/connect', [SsoLoginController::class, 'connect'])->name('sso.connect'); Route::get('/sso/connect', [SsoLoginController::class, 'connect'])->name('sso.connect');