Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

magmatic's avatar

Socialite Provider for WhatsApp?

Is there a reason there is no Socialite Provider for WhatsApp? I would love to ask the user for a phone number, then send him a one-time code with WhatsApp.

0 likes
2 replies
Braunson's avatar

WhatsApp doesn't have a traditional OAuth provider for Laravel Socialite since it's primarily a messaging platform, not a login service. This is why there's no Socialite Provider.

You'll likely want to either build your own custom solution here. What you want to use is the WhatsApp Business API, the regular API doesn't allow for automated OTP sending.

You can use either package netflie/whatsapp-cloud-api or twilio/sdk (if your using the Twilio WhatsApp API).

Something to consider:

  • The Business API requires approval
  • WhatApp charges per message (budget -- I believe the first 1k are free/mo though)
  • What's your fallback if WhatsApp fails? SMS?
OussamaMater's avatar

If it's not an absolute requirement and you value security, go with TOTP, it's much more secure, modern and practical for users. Most major platforms are moving toward TOTP and passkeys, especially since nearly all password managers now support them.

And the quick win is, you can use a first-party, battle-tested package: Fortify.

Please or to participate in this conversation.