Skip to content

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

Open
@ncooke3

Description

@ncooke3

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions