This Spatie post is the source I used for the new Laravel OTP package I covered. If you’re building passwordless flows or 2FA, it’s worth reading because it explains the security model (expiry, origin checks, one-time use) and how the API is meant to be used.
You'll be taken to Spatie to complete your purchase.