Skip to content

Commit

Permalink
add access validator
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiritin committed Mar 19, 2023
1 parent c375dcb commit df88ca1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/OidcClientController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function callback(Request $request)
Session::remove("login.oauth2state");
return Redirect::route('auth.login');
}

Session::flush();
/**
* Get Tokens
*/
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Middleware/AccessTokenValidationMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function handle(Request $request, Closure $next)
/**
* If token expired, refresh using refresh token.
*/
if (!$token->hasExpired()) {
if ($token->hasExpired()) {
$provider = (new OpenIDService())->setupOIDC($request, false);
try {
$token = $provider->getAccessToken('refresh_token', [
Expand Down

0 comments on commit df88ca1

Please sign in to comment.