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

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

Closed
dennysoft opened this issue Sep 16, 2024 · 5 comments · Fixed by #13715

Comments

@dennysoft
Copy link

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
Replace this line with the contents of your Package.resolved.

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!
@google-oss-bot
Copy link

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

@dennysoft dennysoft changed the title Method getCredentialWith crash when close browser with end button getCredentialWith method misbehaves when closing the browser with the Finish button or following an authentication error Sep 16, 2024
@dennysoft dennysoft changed the title getCredentialWith method misbehaves when closing the browser with the Finish button or following an authentication error getCredentialWith method misbehaves when closing the browser with the "End button" or following an authentication error Sep 16, 2024
@ncooke3
Copy link
Member

ncooke3 commented Sep 17, 2024

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.

  • Do you have swizzling enabled or disabled? If you haven't included FirebaseAppDelegateProxyEnabled: NO, then it's enabled.
  • Are you able to provide screenshots of the difference in behavior you are seeing?
  • Do you have a SceneDelegate implemented and does it implement this method: https://developer.apple.com/documentation/uikit/uiscenedelegate/3238059-scene ?
  • Does the issue happen after calling getCredentialWith on the oidc provider instance?

@dennysoft
Copy link
Author

dennysoft commented Sep 18, 2024

Hi @ncooke3

  • i haven't included FirebaseAppDelegateProxyEnabled: NO
  • when call getcredentialwith and then close browser with end button (not complete authentication) the app gets restarted
  • i use Appdelegate with func application( _ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:] ) -> Bool
  • Yes after calling getCredentialWith on oidc provider instance, open browser and then click on button end or authentication get me error, the view controller (my app) is restarted

@ncooke3
Copy link
Member

ncooke3 commented Sep 24, 2024

Hi @dennysoft, we've identified the issue and will have a fix (#13715) tentatively scheduled to be released next week.

@dennysoft
Copy link
Author

Thanks!

@firebase firebase locked and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants