Fix auth translations and admin PWA UI
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-16 12:14:53 +01:00
parent 292c8f0b26
commit 918bff08aa
44 changed files with 2504 additions and 677 deletions

View File

@@ -47,6 +47,15 @@ class AuthenticatedSessionController extends Controller
$user = Auth::user();
if ($user && $user->email_verified_at === null) {
$intended = $request->session()->get('url.intended');
$intended = is_string($intended) ? trim($intended) : null;
if ($this->isVerificationLink($intended)) {
$request->session()->forget('url.intended');
return Inertia::location($intended);
}
return Inertia::location(route('verification.notice'));
}
@@ -116,6 +125,29 @@ class AuthenticatedSessionController extends Controller
);
}
private function isVerificationLink(?string $target): bool
{
if (! is_string($target) || trim($target) === '') {
return false;
}
$path = trim($target);
if (str_starts_with($path, '/verify-email/')) {
return true;
}
$parsed = parse_url($path);
if ($parsed === false) {
return false;
}
$path = $parsed['path'] ?? '';
return $path !== '' && str_starts_with($path, '/verify-email/');
}
private function decodeReturnTo(string $value, Request $request): ?string
{
$candidate = $this->decodeBase64Url($value) ?? $value;