Category : laravel-fortify

I’m trying to make Fortify with sanctum work with a custom Guard called SPA. The admins are logging in on the backend with the Web guard. The users are logging in on a subdomain that will host a VUEJS SPA. Admin logs in on -> https://test.local:8890/admin/login and is redirected to https://test.local:8890/admin/dashboard that works -> ok ..

Read more

What am I doing wrong? The routing is correct. A dd() in login() function works and dd() inside Fortify::authenticateUsing(function ($request) {} doesnt work. I tried placing Fortify::authenticateUsing(function ($request) {} in FortifyServiceProvider‘s boot() function, but I dont know how to call it using an xhr post request. <?php namespace AppHttpControllers; use AppHttpControllersController; use AppProvidersRouteServiceProvider; use IlluminateHttpRequest; ..

Read more

Im currently working on record user’s last login timestamp and logged ip to user table. i did this in laravel 7 in auth controller login function. like this: $user->last_login = Carbon::now()->toDateTimeString(); $user->last_login_ip = $request->getClientIp(); $user->save(); but current project i use laravel fortify package. Im still learning about this package. what is the best way to ..

Read more

Context With Postman, I send the following fields in order to register a user in the db, to the URL http://mywebsite/register: email password password_confirmation name According to the documentation https://laravel.com/docs/8.x/fortify#registration (from which I found the above fields), Fortify already defines the route register so I don’t need to define it myself. According to the documentation, ..

Read more

I am implementing the forgot password / password reset logic with Laravel 8 and Fortify for an SPA application. When the /reset-password is called and if the data are all correct (email, password, password_confirmation, token), I get a server side error: Target [LaravelFortifyContractsResetsUserPasswords] is not instantiable. The route is defined as follows in api.php: Route::post(‘/reset-password’, ..

Read more