From f969893cdd9c0c3e71ea540997fc0c0711bc6e58 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Dadashi Date: Thu, 19 Oct 2023 21:35:17 +0330 Subject: [PATCH 1/2] docs: add logout to session except list --- docs/customization/route_config.md | 2 +- docs/quick_start_guide/using_session_auth.md | 2 +- docs/references/controller_filters.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/customization/route_config.md b/docs/customization/route_config.md index 46d1c6597..af56af08f 100644 --- a/docs/customization/route_config.md +++ b/docs/customization/route_config.md @@ -57,7 +57,7 @@ update the paths for `except`: public $globals = [ 'before' => [ // ... - 'session' => ['except' => ['*/login*', '*/register', '*/auth/a/*']], + 'session' => ['except' => ['*/login*', '*/register', '*/auth/a/*', 'logout']], ], // ... ]; diff --git a/docs/quick_start_guide/using_session_auth.md b/docs/quick_start_guide/using_session_auth.md index 645d2a1b2..43e3fe80f 100644 --- a/docs/quick_start_guide/using_session_auth.md +++ b/docs/quick_start_guide/using_session_auth.md @@ -100,7 +100,7 @@ If you want to limit all routes (e.g. `localhost:8080/admin`, `localhost:8080/pa public $globals = [ 'before' => [ // ... - 'session' => ['except' => ['login*', 'register', 'auth/a/*']], + 'session' => ['except' => ['login*', 'register', 'auth/a/*', 'logout']], ], // ... ]; diff --git a/docs/references/controller_filters.md b/docs/references/controller_filters.md index 88dfe4c1a..7b88cc264 100644 --- a/docs/references/controller_filters.md +++ b/docs/references/controller_filters.md @@ -47,7 +47,7 @@ If you want to limit all routes (e.g. `localhost:8080/admin`, `localhost:8080/pa public $globals = [ 'before' => [ // ... - 'session' => ['except' => ['login*', 'register', 'auth/a/*']], + 'session' => ['except' => ['login*', 'register', 'auth/a/*', 'logout']], ], // ... ]; @@ -102,7 +102,7 @@ Then the global `before` filter for `session` should look like so: public $globals = [ 'before' => [ // ... - 'session' => ['except' => ['accounts/login*', 'accounts/register', 'accounts/auth/a/*']] + 'session' => ['except' => ['accounts/login*', 'accounts/register', 'accounts/auth/a/*', 'accounts/logout']] ] ] ``` From eef12aebd6964219261227454373244ca3f7ee13 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 20 Oct 2023 03:54:57 +0330 Subject: [PATCH 2/2] fix logout route for `{locale}` --- docs/customization/route_config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/customization/route_config.md b/docs/customization/route_config.md index af56af08f..09a15da09 100644 --- a/docs/customization/route_config.md +++ b/docs/customization/route_config.md @@ -57,7 +57,7 @@ update the paths for `except`: public $globals = [ 'before' => [ // ... - 'session' => ['except' => ['*/login*', '*/register', '*/auth/a/*', 'logout']], + 'session' => ['except' => ['*/login*', '*/register', '*/auth/a/*', '*/logout']], ], // ... ];