Several services support phone verification, including Naver Cloud Console, Kakao AlimTalk, and NICE. This guide shows how to implement it in Flutter with
In the Firebase console, go to Build > Authentication and click Get started.
Getting started with Authentication
Enable Phone in the sign-in method settings. If you use an emulator, add a fictional test phone number and verification code. I added +1 1234567812 and 123654.
To use Firebase Auth in the Android app, add its signing certificate fingerprints. Run the relevant command below to find them. If prompted for the default password, enter android.
Tap the text, complete the CAPTCHA, and check for the verification success message in the logs. If you see the error below, see Error When Requesting Verification.
Fatal error: Please register custom URL scheme app-1-****** in the app's Info.plist file.
This callback handles automatic SMS code verification on Android devices.
verificationCompleted: (PhoneAuthCredential credential) { print("credential: $credential"); await auth.signInWithCredential(credential); // 자동 인증 과정 진행},
After the user enters the SMS code, use the following code to complete verification. Use the verificationId received from 4.3. codeSent. See the complete example below.
Firebase/CoreOnly (= 11.8.0)2 You have either: * out-of-date source repos which you can update with pod repo update or with pod install --repo-update. * changed the constraints of dependency Firebase/CoreOnly inside your development pod firebase_core. You should run pod update Firebase/CoreOnly to apply changes you've made. /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in raise_error_unless_state' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in block in unwind_for_conflict' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in tap' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in unwind_for_conflict' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:257:in process_topmost_state' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in resolve' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in resolve' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:94:in resolve' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:1082:in block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:1080:in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:125:in analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:422:in analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:244:in block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:243:in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:162:in install!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command/install.rb:52:in run' /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/bin/pod:55:in <top (required)>' /usr/local/bin/pod:23:in load' /usr/local/bin/pod:23:in `<main>'Error output from CocoaPods:↳ [!] Automatically assigning platform iOS with version 13.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.To update the CocoaPods specs, run: pod repo updateError running pod installError launching application on iPhone 16 Pro Max.
Podfile.lock pins Firebase/CoreOnly to 11.6.0, while the firebase_core plugin requires 11.8.0.
!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly": In snapshot (Podfile.lock): Firebase/CoreOnly (= 11.6.0) In Podfile: firebase_core (from .symlinks/plugins/firebase_core/ios) was resolved to 3.12.0, which depends on Firebase/CoreOnly (= 11.8.0)You have either: * changed the constraints of dependency Firebase/CoreOnly inside your development pod firebase_core. You should run pod update Firebase/CoreOnly to apply changes you've made.