dimanche 29 septembre 2019

How to redirect admin to admin dashboard if login is ajax?

I have Ajax Login in Laravel 5.8 that work fine but I need to redirect admin users to the admin dashboard but since the login is performed using Ajax I was thinking to return response contain indication that this user is admin and then make JQuery redirect that admin to admin dashboard. is there some other recommended way? and what about security especially that I will use policies on dashboard page to check if the redirected user is really admin and have the corresponding privileges (not relying on JQuery just using it to redirect)? I know this question may seem naive but I want to make sure there is no other better way, would you please kindly answer me?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2ok5xHL
via IFTTT

Aucun commentaire:

Enregistrer un commentaire