Comments (6)
Hi. Would you please try to run php artisan route:clear
?
https://stackoverflow.com/a/37879020
from laravel-keycloak-web-guard.
It is not possible to do run php artisan route:clear
, because I also get this Exception:
Symfony\Component\Routing\Exception\RouteNotFoundException
Route [keycloak.callback] not defined.
at C:\xampp\htdocs\laravel\vendor\laravel\framework\src\Illuminate\Routing\UrlGenerator.php:429
I can run the command, but I have to remove the following code from the AuthServiceProvider.php before:
if (Gate::denies('keycloak-web', 'auth')) {
return abort(403);
}
But that was not the solution of my problem.
from laravel-keycloak-web-guard.
I was not able to reproduce the problem.
I have two routes to check just login and to check Gate in my example environment and everything is OK.
You are not required to use Gate to make sure a URL is private. Indeed you should use gate to check the user has a specific role. In your case, are you trying to check the user has the 'auth' role in Keycloak?
After 5 minutes:
Now I figured you are using Gate in boot method. Why?
I guess it's too early.
from laravel-keycloak-web-guard.
Yes, a login should be only possible, if the user has the 'auth' role.
I want to do this check as soon as possible.
from laravel-keycloak-web-guard.
Please. Try to do this in controller layer.
from laravel-keycloak-web-guard.
Thank you. I solved it with a custom Middleware.
from laravel-keycloak-web-guard.
Related Issues (20)
- Adding optional scopes
- Logout if connect in other devices
- [Keycloak Error] User cannot be authenticated HOT 1
- Logout while invalid state..
- Web and Web service in single application.
- Can't Get status or enabled user keycloak HOT 1
- Logout url missing error when trying to authenticate
- I am available to join the maintainer team. HOT 1
- Get id_token the keycloak
- Looping infinito de login do Keycloak Can HOT 4
- How to make it work with Eloquent?
- Wrong intent is stored by Laravel because it ignores the proxies that are not direct clients and there is no fix. HOT 3
- $url->forceRootUrl not added to keycloak-web.redirect_url
- alteração no comportamento do middleware keycloak can HOT 4
- after redirecting auth()->user() returns an empty record HOT 2
- KEYCLOAK_REALM_PUBLIC_KEY HOT 2
- [Keycloak Error] Invalid state in IFRAME HOT 1
- Call to undefined method Vizir\KeycloakWebGuard\Auth\Guard\KeycloakWebGuard::loginUsingId() HOT 2
- Vizir\KeycloakWebGuard
- Keycloak 21+ HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-keycloak-web-guard.