Function: isWhatsAppConfigured()
isWhatsAppConfigured(
messagingUtils?):Promise<boolean>
Defined in: auth/src/auth/shared.ts:273
Determines whether WhatsApp should currently be offered as a one-time code delivery channel. The OTP routes
(BaseAuthDiscoverRoute, BaseAuthOTPRoute, BaseAuthMFARoute and BaseAuthElevationRoute) consult this
before listing a WhatsApp option for a verified phone contact and before honoring a request for one, so
WhatsApp is never offered on a server that can't deliver over it.
Resolved in order:
- The optional
isWhatsAppConfigured(): boolean | Promise<boolean>hook onmessagingUtils, when it defines one. It is called on every check (nothing is cached here) and its result is authoritative. A hook that throws is treated asfalse. - Otherwise
@rapidrest/core's own state:MessagingUtilskeeps its validatedwhatsappconfiguration in a private field namedwhatsapp, set onceinit()has accepted thewhatsappconfig block. That field being truthy means WhatsApp is configured.
Parameters
messagingUtils?
The messaging service the routes send codes through. false when not provided.
Returns
Promise<boolean>