Skip to content

Commit cd4c513

Browse files
committed
Set CookieJar on GatewayGuard in auth extension
The gateway guard now sets a cookie jar when registered, preventing logout failures caused by a missing jar.
1 parent 9b947e1 commit cd4c513

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Providers/MicroserviceServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,17 @@ public function boot(Router $router): void
6868
Auth::extend('gateway', function ($app, $name, array $config) {
6969
$provider = Auth::createUserProvider($config['provider'] ?? null);
7070

71-
return new GatewayGuard(
71+
$guard = new GatewayGuard(
7272
$name,
7373
$provider,
7474
$app['session.store'],
7575
$app->make('request'),
7676
$app->make(AuthServiceClient::class)
7777
);
78+
79+
$guard->setCookieJar($app['cookie']);
80+
81+
return $guard;
7882
});
7983

8084
// Authorization gates

0 commit comments

Comments
 (0)