SwiftfulThinking / SwiftfulFirebaseAuth

Firebase Authentication for Swift projects.
https://www.swiftful-thinking.com
62 stars 12 forks source link

[Feature] Implement Firebase Phone Authentication #5

Closed vamsii777 closed 6 months ago

vamsii777 commented 6 months ago

This pull request introduces support for Firebase Phone Authentication.

  1. SignInWithPhoneHelper: A new helper class that manages the initial phone number authentication flow. It handles the process of verifying the phone number and storing the necessary verificationID in UserDefaults.

  2. authenticateUser_PhoneNumber: Added a new function to the AuthProvider protocol and its implementation in the FirebaseAuthProvider class. This function takes the phone number and the verification code (if available) and completes the authentication process using the stored verificationID.

  3. Error Handling: The new functionality includes proper error handling for cases where the verificationID or verificationCode is not found.