Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ncooke3 opened this issue Sep 16, 2024 · 0 comments

Comments

@ncooke3
Copy link
Member

ncooke3 commented Sep 16, 2024

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:

  • Add @discardableResult to the API
  • Add new API for scene delegate context (e.g. canHandle(_ urlContext: URLContext) -> Void to the API surface
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

@ncooke3 ncooke3 added this to the Firebase 12 milestone Sep 16, 2024
@paulb777 paulb777 changed the title [Auth]: Evaluate Auth.auth().candHandle(_ url: URL) -> Bool in a scene delegate context [Auth]: Evaluate Auth.auth().canHandle(_ url: URL) -> Bool in a scene delegate context Sep 17, 2024
@ncooke3 ncooke3 modified the milestones: Firebase 12, 11.3.0 - M154 Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant