Reference
?

auth.phone

Phone helpers for building an SMS sign-in input.
auth.phone.toE164(value, country) → string

The building blocks of a phone input: a country list (auth.phone.countries), timezone-based country detection, E.164 conversion, formatting, and validation. Use them to normalize what a user types before passing it to sendSmsCode.

Usage
auth.phone.detectCountry();                  // 0
auth.phone.toE164('5551234567', 'US');       // 3
auth.phone.format('+15551234567');           // 5
auth.phone.isValid('+15551234567');          // true