Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 when trying to impersonate #74

Open
waotaa opened this issue Nov 27, 2020 · 3 comments
Open

404 when trying to impersonate #74

waotaa opened this issue Nov 27, 2020 · 3 comments

Comments

@waotaa
Copy link

waotaa commented Nov 27, 2020

When I try to impersonate a user I get a 404. After manually changing the url the impersonation does not work.

The url he's trying to follow:
/nova-impersonate/users/8/web?redirect_to=%2F

My User Resource:

public function fields(Request $request)
    {
        return [
            ...
            Impersonate::make($this),
            ...
        ];
    }

I'm also using the canImpersonate method on my user, but that returns true

This looks to me as the most basic implementation of your package, but I can't get it to work

@KABBOUCHI
Copy link
Owner

Why you want to change the url? the url is hardcoded in vue, you can't change it

@waotaa
Copy link
Author

waotaa commented Nov 27, 2020

I don't. I meant after the 404 I navigated elsewhere hoping the impersonation would still work. But it didn't

@waotaa
Copy link
Author

waotaa commented Nov 30, 2020

Ah after going through the code I saw your check for the cached routes.
I cleared my route cache and that fixed it

php artisan route:cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants