firebase / firebase/firebase-ios-sdk
[Auth]: Evaluate `Auth.auth().canHandle(_ url: URL) -> Bool` in a scene delegate context
- Dominant language
- C++
- Stars
- 6.7k
- Forks
- 1.8k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 72
Description
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
```swift
func scene(_ scene: UIScene, openURLContexts URLContexts: Set) {
for urlContext in URLContexts {
let url = urlContext.url
_ = Auth.auth().canHandle(url)
}
}
```
### API Proposal
_No response_
### Firebase Product(s)
Authentication
Contributor guide
Assessment
This issue has not been assessed yet.