die tenant admin oauth authentifizierung wurde implementiert und funktioniert jetzt. Zudem wurde das marketing frontend dashboard implementiert.

This commit is contained in:
Codex Agent
2025-11-04 16:14:17 +01:00
parent 92e64c361a
commit fe380689fb
63 changed files with 4239 additions and 1142 deletions

View File

@@ -3,11 +3,9 @@
namespace Tests\Feature\Auth;
use App\Models\User;
use App\Notifications\VerifyEmail;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Notification;
use Tests\TestCase;
use Illuminate\Support\Facades\Auth;
use Tests\TestCase;
class LoginTest extends TestCase
{
@@ -27,7 +25,8 @@ class LoginTest extends TestCase
]);
$this->assertAuthenticated();
$response->assertRedirect(route('dashboard', absolute: false));
$expectedDefault = rtrim(route('tenant.admin.app', absolute: false), '/').'/events';
$response->assertRedirect($expectedDefault);
$this->assertEquals('valid@example.com', Auth::user()->email);
}
@@ -45,7 +44,8 @@ class LoginTest extends TestCase
]);
$this->assertAuthenticated();
$response->assertRedirect(route('dashboard', absolute: false));
$expectedDefault = rtrim(route('tenant.admin.app', absolute: false), '/').'/events';
$response->assertRedirect($expectedDefault);
$this->assertEquals('validuser', Auth::user()->username);
}
@@ -82,10 +82,32 @@ class LoginTest extends TestCase
]);
$this->assertAuthenticated();
$response->assertRedirect(route('dashboard', absolute: false));
$expected = rtrim(route('tenant.admin.app', absolute: false), '/').'/events';
$response->assertRedirect($expected);
$response->assertSessionHas('success', 'Sie sind nun eingeloggt.');
}
public function test_login_honors_return_to_parameter()
{
$user = User::factory()->create([
'email' => 'return@example.com',
'password' => bcrypt('password'),
'email_verified_at' => now(),
]);
$target = route('tenant.admin.app', absolute: false);
$encoded = rtrim(strtr(base64_encode($target), '+/', '-_'), '=');
$response = $this->post(route('login.store'), [
'login' => 'return@example.com',
'password' => 'password',
'return_to' => $encoded,
]);
$this->assertAuthenticated();
$response->assertRedirect($target);
}
public function test_login_redirects_unverified_user_to_verification_notice()
{
$user = User::factory()->create([