firebase-ios-sdk
firebase-ios-sdk copied to clipboard
[Auth]: Evaluate `Auth.auth().canHandle(_ url: URL) -> Bool` in a scene delegate context
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
@discardableResultto the API - Add new API for scene delegate context (e.g.
canHandle(_ urlContext: URLContext) -> Voidto 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