Comments (7)
I have two guards, admin and the default web. When I'm trying to impersonate an admin as a default user, I'm getting this issue.
What I'm doing wrong? If you need more information, please, let me know, and I'll share you what you need.
Thanks in advance!
Did you add the traits to our authenticable model?
from filament-impersonate.
Yeah, and not working.
use Lab404\Impersonate\Models\Impersonate;
final class Admin extends Authenticatable implements FilamentUser, MustVerifyEmail
{
use Impersonate;
...
}
---
use Lab404\Impersonate\Models\Impersonate;
final class User extends Authenticatable implements FilamentUser, MustVerifyEmail
{
use Impersonate;
...
}
Do you mean this, right?
from filament-impersonate.
how about in your filament panel? did you declare the guard should be used?
and can you add this to your authenticable
public function canImpersonate(): bool
{
return true;
}
from filament-impersonate.
I'm logged as "admin":
public function panel(Panel $panel): Panel
{
return $panel
->authGuard('admin')
...
}
and my impersonate button is like:
Impersonate::make('impersonate')
->guard('web')
->link()
->iconSize(IconSize::Small)
I need to change something in laravel-impersonate config?
canImpersonate is automatically established as true
.
from filament-impersonate.
I'm logged as "admin":
public function panel(Panel $panel): Panel { return $panel ->authGuard('admin') ... }
and my impersonate button is like:
Impersonate::make('impersonate') ->guard('web') ->link() ->iconSize(IconSize::Small)
I need to change something in laravel-impersonate config?
canImpersonate is automatically established as
true
.
I'm not quit sure now what is the cause of issue you encountered, there is no needed really to change in the config file, maybe you need to revisit the README file and check on what steps you missed and if you are caching you laravel you need to clear it.
from filament-impersonate.
At last, I have achieved the way to impersonate the user. But, when I put the banner component, I got this message:
But in debugbar the user is logged, but the admin is logged out, so, I don't know what it's happening...
from filament-impersonate.
I just found the issue...
The problem was, I was redirecting impersonated user to a route without 'web' middleware. :(
I made my site with Folio laravel, and by default is not set.
Thanks for your help :)
from filament-impersonate.
Related Issues (20)
- Banner RTL Support HOT 3
- Localize Banner Strings. HOT 1
- Multi Guard issue. HOT 4
- Impersonate doesnt show on new ActionGroup
- Bump version to Laravel 10 HOT 4
- Cannot declare class STS\FilamentImpersonate\Impersonate, because the name is already in use when caching route HOT 1
- Not working when using laravel octane HOT 3
- Not showing the Navigation Menu of Laravel HOT 1
- error filamentManager::getCurrentPanel() HOT 5
- Route [filament.auth.login] not defined. HOT 1
- Enable to show banner HOT 5
- Formatting of Action in a group doesn't match other Actions HOT 6
- [Suggestion] Submit to Filament plugins site HOT 1
- Crashing when leaving impersonate HOT 4
- Cause gap on Filament Sidebar HOT 5
- Error on impersionate HOT 4
- Display issue HOT 8
- Error on redirect FilamentManager::getUserName() HOT 3
- Auto mode not working properly
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 filament-impersonate.