Skip to content

Integrating PhoneAuth with Firebase for Mac Catalyst #7049

Closed
@gevorgyanvahagn

Description

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.2
  • Firebase SDK version: 6.9.2
  • Installation method: CocoaPods
  • Firebase Component: Auth

[REQUIRED] Step 2: Describe the problem

With Mac Catalyst when the PhoneAuthProvider.provider().verifyPhoneNumber(:, uiDelegate:, completion:) calls the Safari on Mac opens and the user receives following error:

FIRAuthErrorDomain Code=17058 "The interaction was cancelled by the user." UserInfo={NSLocalizedDescription=The interaction was cancelled by the user., FIRAuthErrorUserInfoNameKey=ERROR_WEB_CONTEXT_CANCELLED}

Steps to reproduce:

  1. Run any app with phone auth on Mac OS.
  2. Call PhoneAuthProvider.provider().verifyPhoneNumber(:, uiDelegate:, completion:) method with valid phone number

Relevant Code:

PhoneAuthProvider.provider().verifyPhoneNumber(validPhoneNumber, uiDelegate: nil) { ( _, error) in
                    if let error = error {
                        // User receives an error
                        assertionFailure(error.localizedDescription)
                    }
                    ...
                }

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions