firebase / firebase-ios-sdk

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

getCredentialWith method misbehaves when closing the browser with the "End button" or following an authentication error #13645

Open dennysoft opened 4 days ago

dennysoft commented 4 days ago

Description

I have updated the Firebase SDK to version 11.2.0. Using the get Credential With method to connect to a provider using oidc connect. If an error occurs during authentication or I close the browser with the Finish button, the method receives the error (browser closed by user error code: 17058) but the app controller is closed it seems to lose context and app window closes I have no possibility to show the error on the screen. This was not the case with previous versions of the Firebase SDK. It's not a bug in my app as the same code with version 10.27.0 works perfectly.

Reproducing the issue

I instantiate the OAuthProvider object and launch the Get Credential With method with a button, the browser opens and I press the finish button. The app window closes.

Firebase SDK Version

11.2.0

Xcode Version

15.4

Installation Method

Swift Package Manager

Firebase Product(s)

Authentication

Targeted Platforms

iOS

Relevant Log Output

No response

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
```json Replace this line with the contents of your Package.resolved. ```

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
```yml Replace this line with the contents of your Podfile.lock! ```
google-oss-bot commented 4 days ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

ncooke3 commented 3 days ago

Thanks for the report, @dennysoft, and apologies for the trouble. I have a couple questions to help me better understand the behavior you are seeing.

dennysoft commented 2 days ago

Hi @ncooke3