132 questions
3
votes
1
answer
64
views
Laravel Fortify ignores custom guard for 2fa
I have a Laravel 12 with 2 guards "web" and "admin", the admin guard has its own user table "admins" (privacy concerns).
We have 2 Models "User" and "Admin&...
0
votes
1
answer
224
views
Why is auth:sanctum used on api routes and not on web routes?
I am using Laravel sanctum SPA auth to protect my routes/api.php routes. Instead of manually implementing the routes and controllers for authentication, I am using Laravel Fortify.
Now Fortify adds ...
0
votes
0
answers
67
views
Laravel/Livewire password validation is failing when passwords match
Laravel/Livewire password validation is failing when passwords match. Using laravel/fortify.
In BasicWizardStepComponent:
abstract class BaseWizardStepComponent extends StepComponent
{
abstract ...
0
votes
0
answers
34
views
Customizing Fortify for Multi-Tenant Password Resets Tokens with Domain-Specific Tokens
I am implementing a multi-tenant application using Laravel Fortify and Jetstream and need to ensure that password reset tokens are scoped by domain. My password_reset_tokens table includes a domain_id ...
0
votes
0
answers
59
views
Jetclient making calls to a local DDEV server. Setting up SPA, domain issues
I'm building an APi in Laravel for a future front end (react) to talk to and handle all queries (inc user management)
this is largely working.
Now I want to set up 2FA via Fortify.
I'm having auth ...
0
votes
2
answers
239
views
Passing properties to an Inertia Vue page for Laravel Fortify's register view
I'm working on a web app that's using Laravel 10, Vue 3, and Inertia. (I'm new to all of these, btw) Laravel is using Fortify for a lot of features, including new user registration. I've been tasked ...
0
votes
0
answers
71
views
I want to change email field name to email_id in uses without custom code but Laravel Fortify giving me errors
I am changing my users database table field email to email_id, how do I change that also in Fortify without any custom code and with no errors?
You ask why not custom code because I have to write all ...
-3
votes
1
answer
133
views
Why is Laravel Fortify coded in a way that is not MVC?
I'm new to using laravel packages and I always code following MVC in mind, regardless what functionality it is, it will always follow the MVC pattern. All route related goes to web.php (for web), all ...
0
votes
1
answer
282
views
How to send laravel 10 fortify reset password email via database queue system?
I have Laravel 10 as my API backend with Fortify. When resetting the password, I want to send HTML content (retrieved from the database) to an email. The email should be queued, possibly via the jobs ...
5
votes
7
answers
10k
views
How to control RedirectIfAuthenticated behavior?
This is Laravel 11 + Fortify + Sanctum. I'm using Laravel for my API backend. Front-end is a 1st-party SPA.
I was just testing my login endpoint (POST) using Thunder Client (XHR). When login call ...
1
vote
1
answer
1k
views
Error 419 (unknown status) CSRF token mismatch. | Laravel Sanctum + Fortify + Vue SPA
I get a "419 (unknown status)" error when sending a post request to login user
POST http://localhost/login 419 (unknown status)
Network request response : "message": "CSRF ...
1
vote
1
answer
91
views
Laravel - How to pass arguments to function in route controlller?
I am using Laravel Fortify to register my users.
I have multiple kinds of users.
Below is the code to access the registration controller :
Route::post(
RoutePath::for('register', '/register'),
...
0
votes
1
answer
512
views
Laravel Fortify (Jetstream) Login Without Reload Using Livewire
I'm using Laravel Jetstream with Livewire for my authentication. I've used Livewire 3 Navigation to create links without reloading and logout without reloading. But I'm still stuck in one thing. I ...
0
votes
1
answer
360
views
Laravel Jetstream redirects when trying to access an API endpoint
When I try to access an endpoint in my Laravel API, Jetstream redirects to the dashboard page. I am already logged in, and when I go to my endpoint from the dashboard, it goes back to the dashboard. I ...
0
votes
1
answer
375
views
route problem when confirming two factor with laravel fortify and inertiajs
I have a TwoFactorConfirm page, where an OTP code input is expected after the 2fa device is set, and a POST request is made to route('two-factor.confirm') provided by Fortify like this:
const { data, ...
1
vote
0
answers
789
views
CSRF token mismatch error while authenticating Vue3 SPA with Laravel Fortify using axios
I am trying to setup an SPA in Vuejs with Laravel 10 on localhost. I am using axios for api requests.
Laravel 10 is running on port 8000
Vue3 is running on port 5173
I am able to successfully get csrf-...
0
votes
0
answers
397
views
Customizing Laravel Fortify's reset password functionality
I am trying to figure out how to modify Laravel (v8) Fortify's logic when looking up which user has requested a password reset. Due to the nature of our application, a user can have 2 records in the ...
1
vote
1
answer
295
views
Why has Fortify route for verifyfing an email address an auth middleware attached?
I´m wondering why routes in Fortify which don´t require a user to be logged in has the auth middleware attached to it.
E.g. the Route to verify an E-Mail
Route::get(RoutePath::for('verification.verify'...
2
votes
2
answers
1k
views
Why does Laravel Fortify send a redirect on an API Request?
I´m using Laravel (10) Fortify (with Sanctum), to authenticate requests to the REST API. It works quite well but I´ve one serious issue and I think it´s simply a configuration problem:
Whenever an API ...
-1
votes
1
answer
225
views
laravel 10 fortify password reset
I am using the laravel 10 / Fortify RestUserPassword flow in my login template. Step 2 leads to the email request as per below:
<form action="{{route('password.email')}}" method=&...
1
vote
0
answers
202
views
Laravel fortify endpoint `user/password` change middleware to sanctum
Fortify already has a route for changing password of a user
PUT api/user/password .. user-password.update › Laravel\Fortify › PasswordController@update
⇂ api
...
1
vote
0
answers
112
views
laravel fortify + spa - "Target class [guest] does not exist."
I'm testing out Laravel Fortify as authentication backend for a spa, my current configuration is Laravel ^10.10 + Fortify ^1.18 in a docker container on localhost:8000 and my Nuxt 3 spa in another ...
1
vote
1
answer
879
views
Creating a Login Page with Fortify and Livewire in Laravel
I'm working on building a login page for my Laravel application using Fortify and Livewire. I've made some progress with the code, but I'm encountering some issues. Here's what I've done so far:
In ...
0
votes
0
answers
324
views
How can I edit the default behavior of jetstream's email verification on Laravel
I recently created a Laravel project with Jetstream and Livewire implemented and I want change the behavior of the email verification feature after login or registration such that rather than ...
3
votes
1
answer
453
views
Laravel 10 Fortify twoFactorAuthentication options
After publishing Foritfy I see the following options for the twoFactorAuthentication feature
Features::twoFactorAuthentication([
'confirm' => true,
'confirmPassword' => true,
'window'...
-1
votes
1
answer
340
views
Handling Failed Mails in Laravel Fortify: Logging Error 500 Only
In my Laravel Fortify application, I am facing issues with handling failed mail sending. Specifically, when an attempt to send an email fails, it triggers an error 500 response, which is not desirable ...
-1
votes
1
answer
751
views
Laravel Fortify 2FA Recovery Code Login Not Working
I've got 2FA working in my app with the qr code, but the recovery code route isn't working for some reason. I always get the error:
The provided two factor authentication code was invalid.
I don't ...
0
votes
1
answer
426
views
Laravel Fortify password reset link giving ArgumentCountError when clicked
Using Laravel 9 and Fortify, I can get a link sent by email that should enable the user to reset their password, as per the docs.
This link has the form /api/reset-password?token=yadayada&email=...
0
votes
1
answer
880
views
How to override forgot password validation in Laravel Fortify?
I'm using Laravel Fortify for user authentication in my Laravel application. I have overridden the validation for the login process by using the Fortify::authenticateUsing method, which allows me to ...
0
votes
1
answer
863
views
Laravel Fortify Routes not Registering
I'm using PHP 8.2.0, Laravel 10.9.0, Inertia 1.0.6 and Vue 3.2.47. I've uncommented Features::resetPasswords() from config/fortify.php, and I've added Fortify::requestPasswordResetLinkView(function() {...
0
votes
2
answers
2k
views
How to make Fortify send different reset password link for Admin and User?
I'm using Laravel Fortify in my site. It has 2 different authentication screens for Admin and User. For example:
Admin login route: /admin/login
Admin forgot password route: /admin/forgot-password
...
0
votes
1
answer
838
views
Laravel Fortify verification.notice route not defined
I am trying to use Laravel Fortify for authentication. All routes work fine except for email verification.
I have done everything according to docs as far as I understand:
Impemented Illuminate\...
0
votes
1
answer
816
views
Laravel fortify verify email using rest API
I am using fortify for the user authentication and management. I am making a rest api application and I want to use use Laravel\Fortify\Http\Controllers\VerifyEmailController or implement ...
0
votes
1
answer
339
views
How to enable LogoutOtherDevices in Laravel Fortify
I am using Laravel Fortify in my custom Laravel Application I have implemented almost all the feature but I can't figure it out how to implement LogoutOtherDevices feature. Also it is not documented ...
0
votes
1
answer
597
views
Laravel Fortify and JSON based registering result in CRSF mismatch
I'm currently toying with Laravel 9.x and Fortify.
For the starter here my environnement :
Laravel 9.19
Fortify 1.14
Postgre 15
I try to achieve something I thought was possible from reading the ...
5
votes
1
answer
2k
views
Laravel 9 login as another user
I want to be able to login as another user from my administrator account.
I'm making a SPA application with Inertia Js using laravel fortify to handle sessions and login.
In laravel 8 i was able to ...
0
votes
0
answers
31
views
Laravel 9 and Jetstream with Inertia/Fortify added username login works, but username is not treated as case sensitive [duplicate]
I've successfully added a user field to Jetstream / Inertia registration and logins in Laravel 9 with Fortify. The users can now login using either email, or username.
After searching through Laravel ...
0
votes
1
answer
1k
views
Laravel Jetstream - default fortify or sanctum?
I've got a fair amount of experience with laravel but I'm new to jetstream - just having a look into it at the moment and I'm confused regarding authentication methods.
I understand there are two main ...
1
vote
3
answers
3k
views
Error 401: Unauthorized on Laravel Sanctum Authentication and Vue
I get a status error code when I try to access the data after logging in.
I am getting the XRSF token when someone attempts to log in but can't the user data back.
Below is my useAuth.js code
import ...
0
votes
2
answers
228
views
Laravel 9 Hash::check() always returns false using Fortify
Using tinker:
>>> $user = User::create(['name_first' => 'test', 'name_last' => 'last', 'password' => Hash::make('password'), 'email' => '[email protected]']);
=> App\Models\User {...
2
votes
1
answer
3k
views
Laravel: how to customize login error messages through Fortify
I have the following blade view where I want the error messages printed to me:
<x-layout>
@if ($errors->any())
<div class="alert alert-danger">
<ul>
...
0
votes
1
answer
895
views
how to create a flash message when a user successfully logged in on fortify?
how to create a flash message when a user successfully logged in on fortify?
later in the blade view I just need to call using
@if(session()->has('success-login'))
<...
0
votes
1
answer
3k
views
Laravel 9 - ERROR: Auth guard [ admin] is not defined
I'm trying to create an Admin Login in Laravel Jetstream. I've created a separate admins table to store the login data. However, I get an error saying Auth guard [ admin] is not defined when I try to ...
1
vote
1
answer
911
views
Setting up Laravel Fortify's password confirmation
Laravel Fortify creates a new route, /user/confirm-password that takes a password input. This route hits the store method of Laravel\Fortify\Http\Controllers\ConfirmablePasswordController.
The return ...
2
votes
0
answers
329
views
Laravel Fortify 2 factor authentication valid for x days
I’ve implemented 2-factor authentication with Laravel Fortify and was wondering if it’s possible to allow a period of x days before prompting the user for the 2-factor step again if they are still on ...
0
votes
1
answer
747
views
LARAVEL, SESSION doesn't get saved (AttemptToAuthenticate)
I'm trying to make authentification based on user group, but the session won't get saved! Idk why
Here's the bit of my code. I checked everything else and it works. Actually, It worked even before ...
1
vote
1
answer
3k
views
logout doesn't work laravel jetstream, inertia+vue.js
I try to build an app using laravel, jetstream and inertia+vue.js
every routes work fine except logout.
the original code provided by inertia in AppLayout.vue open a modal with 404 error - but the log ...
4
votes
1
answer
12k
views
Error Class "Laravel\Fortify\Features" not found
I have ecommerce laravel application.
Laravel Framework 8.83.8
PHP v8.0.1
I have done
php artisan config:cache
php artisan route:cache
php artisan view:cache
I deployed it on Cloudways (Digital ...
0
votes
1
answer
773
views
Missing required parameter for [Route: verification.verify]
On a project I have I am using Fortify as my BE. I need a multilingual app, therefore I added the
'prefix' => {locale}' to config/fortify.php.
Login, registering, and 2FA, are working ok, but the ...
5
votes
2
answers
2k
views
Laravel 9 Breeze with fortify how disable default routes?
I use laravel only as a backend for a mobile application, for this I use Laravel Sanctum api. I don’t need everything that is displayed in the browser on the site, so I want to disable all unnecessary ...