Scope social login callbacks per flow

This commit is contained in:
Codex Agent
2026-01-23 20:38:22 +01:00
parent 7ee91ff7d7
commit 9ab230f5b7
8 changed files with 8 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ class TenantAdminFacebookControllerTest extends TestCase
{
$driver = Mockery::mock();
Socialite::shouldReceive('driver')->once()->with('facebook')->andReturn($driver);
$driver->shouldReceive('redirectUrl')->once()->with(route('tenant.admin.facebook.callback'))->andReturnSelf();
$driver->shouldReceive('scopes')->once()->with(['email'])->andReturnSelf();
$driver->shouldReceive('fields')->once()->with(['name', 'email', 'first_name', 'last_name'])->andReturnSelf();
$driver->shouldReceive('redirect')->once()->andReturn(new RedirectResponse('https://facebook.com/auth'));