Skip to content

Commit a8287bb

Browse files
committed
fix: replace url_is()
url_is() checks the URI path. If the path is changed, it will not work.
1 parent 0cd5f3f commit a8287bb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Filters/AbstractAuthFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function before(RequestInterface $request, $arguments = null)
3131

3232
if (! auth()->loggedIn()) {
3333
// Set the entrance url to redirect a user after successful login
34-
if (! url_is('login')) {
34+
if (uri_string() !== route_to('login')) {
3535
$session = session();
3636
$session->setTempdata('beforeLoginUrl', current_url(), 300);
3737
}

src/Filters/SessionAuth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function before(RequestInterface $request, $arguments = null)
7575
->with('error', $authenticator->getPendingMessage());
7676
}
7777

78-
if (! url_is('login')) {
78+
if (uri_string() !== route_to('login')) {
7979
$session = session();
8080
$session->setTempdata('beforeLoginUrl', current_url(), 300);
8181
}

0 commit comments

Comments
 (0)