Laravel 9, Jetstream, Inertia, Vue3.
After registering, my user is not authenticated. The system successfully registers (creates a user), but does not log him in. How can I authenticate a user automatically after registering in Jetstream? I have a Jetstream component CreateNewUser, but I don't know what to write and where to make it work.
Add this code to CreateNewUser class
$auth = Auth::attempt([
'email' => $input['email'],
'password' => $input['password']
]);
if ($auth) {
session()->regenerate();
}