Search code examples
laravellaravel-sanctum

Fresh Laravel Sanctum API redirecting to '/dashboard' route


I have a fresh installation of Laravel Sanctum API. When I try to log a user in after registration or when submitting the registration form twice, I get an exception with the message "The route dashboard could not be found". I don't understand why it's trying to redirect the user to the 'dashboard' route. The only place that I can see 'dashboard' in my project is in RouteServiceProvider.This seems like a bug too me with Sanctum.

enter image description here


Solution

  • this error shows when you try to register while you are already logged, so make sure to log out before register