Getting "two_factor: false" when attempting to log in
Hi, I'm using Fortify to the handle the log in for my SPA. I'm also using Sanctum to manage API tokens.
When I try to log in via Postman, I get the following response: { "two_factor": false }, and the user isn't logged in. I take this to mean that two factor authentication has failed (please correct me if I'm wrong). However I have not enabled two factor authentication in Fortify - it is commented out in the features array in the Fortify config.
Upon reading the documentation (again). I realize that this json response isn't indicating what I thought it was. From the Fortify docs:
"Authenticating With Two Factor Authentication
During the authentication process, Fortify will automatically redirect the user to your application's two factor authentication challenge screen. However, if your application is making an XHR login request, the JSON response returned after a successful authentication attempt will contain a JSON object that has a two_factor boolean property. You should inspect this value to know whether you should redirect to your application's two factor authentication challenge screen."
So the response { "two_factor": false } is saying that the app should not redirect to a two factor authentication screen.