Closed dillingham closed 3 years ago
Whilst this would be cool, this isn't the responsibility of Jetstream. Laravel's user verification by default only uses the users email.
Take a look at the App\Actions\Fortify\CreateNewUser
action - this is where the logic is called for sending the verification email. If you want this specific functionality, your best to implement this in your own application, like everyone else.
Alternatively, you could build a package that replaces the action.
It does seem more of an Illuminate topic. Just removing the word email from this class illustrates my pointt. But I see what you mean.
<?php
namespace Illuminate\Auth\Listeners;
use Illuminate\Auth\Events\Registered;
use Illuminate\Contracts\Auth\MustVerifyEmail;
class SendVerificationNotification
{
/**
* Handle the event.
*
* @param \Illuminate\Auth\Events\Registered $event
* @return void
*/
public function handle(Registered $event)
{
if ($event->user instanceof MustVerify && ! $event->user->isVerified()) {
$event->user->sendVerificationNotification();
}
}
}
We have no plans for this atm sorry. Feel free to build this into your own app.
Would be pretty awesome if we could use a notification channel for verification. Email (current) is default. But also sms, phone, etc. Even address verification with a postcard (like nextdoor app) using lob notification channel Maybe even use same programming for 2FA with sms, email & phone codes like banks etc