Stay organized with collections
Save and categorize content based on your preferences.
firebase::auth::PhoneAuthCredential
#include <credential.h>
Wraps phone number and verification information for authentication purposes.
Summary
Inheritance
Inherits from:
firebase::auth::CredentialPublic functions
PhoneAuthCredential
PhoneAuthCredential()
sms_code
std::string sms_code() const
Gets the automatically retrieved SMS verification code if applicable.
This method is only supported on Android.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-23 UTC."],[],[],null,["# firebase::auth::PhoneAuthCredential Class Reference\n\nfirebase::auth::PhoneAuthCredential\n===================================\n\n\n`#include \u003ccredential.h\u003e`\n\nWraps phone number and verification information for authentication purposes.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: [firebase::auth::Credential](/docs/reference/cpp/class/firebase/auth/credential)\n\n| ### Constructors and Destructors ||\n|---|---|\n| [PhoneAuthCredential](#classfirebase_1_1auth_1_1_phone_auth_credential_1a016445a98a16e722980150bc2d10d91c)`()` ||\n| [PhoneAuthCredential](#classfirebase_1_1auth_1_1_phone_auth_credential_1a3e2ec8c6b54a60697969cdc2f76acbea)`(const `[PhoneAuthCredential](/docs/reference/cpp/class/firebase/auth/phone-auth-credential#classfirebase_1_1auth_1_1_phone_auth_credential)` & rhs)` Copy constructor. ||\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [operator=](#classfirebase_1_1auth_1_1_phone_auth_credential_1a9f77f5ec379bb9a13bb64e694a819267)`(const `[PhoneAuthCredential](/docs/reference/cpp/class/firebase/auth/phone-auth-credential#classfirebase_1_1auth_1_1_phone_auth_credential)` & rhs)` | [PhoneAuthCredential](/docs/reference/cpp/class/firebase/auth/phone-auth-credential#classfirebase_1_1auth_1_1_phone_auth_credential)` &` Copy a [Credential](/docs/reference/cpp/class/firebase/auth/credential#classfirebase_1_1auth_1_1_credential). |\n| [sms_code](#classfirebase_1_1auth_1_1_phone_auth_credential_1abf69940355c9398b02f147aec8eefbf8)`() const ` | `std::string` Gets the automatically retrieved SMS verification code if applicable. |\n\nPublic functions\n----------------\n\n### PhoneAuthCredential\n\n```c++\n PhoneAuthCredential()\n``` \n\n### PhoneAuthCredential\n\n```c++\n PhoneAuthCredential(\n const PhoneAuthCredential & rhs\n)\n``` \nCopy constructor. \n\n### operator=\n\n```c++\nPhoneAuthCredential & operator=(\n const PhoneAuthCredential & rhs\n)\n``` \nCopy a [Credential](/docs/reference/cpp/class/firebase/auth/credential#classfirebase_1_1auth_1_1_credential). \n\n### sms_code\n\n```c++\nstd::string sms_code() const \n``` \nGets the automatically retrieved SMS verification code if applicable.\n\nThis method is only supported on Android."]]