firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.66k stars 1.49k forks source link

[Auth]: Evaluate `Auth.auth().canHandle(_ url: URL) -> Bool` in a scene delegate context #13649

Open ncooke3 opened 1 month ago

ncooke3 commented 1 month ago

This is not a breaking change. Added to milestone 12 for reassessment if not address beforehand.

Description

Auth's canHandle(_ url: URL) API doesn't fit as well in the scene delegate world as it does in the app delegate world. In the app delegate of the below scene delegate method, a boolean needs to be returned to the API returns a Bool. That doesn't make sense in the scene delegate world (see below delegate method's lack of return type).

Two approaches:

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
  for urlContext in URLContexts {
      let url = urlContext.url
      _ = Auth.auth().canHandle(url)
  }
}

API Proposal

No response

Firebase Product(s)

Authentication