-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Upgrading to 11.0.0+ causes user to get logged out. #14011
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Thanks for reporting the issue. To be clear, do you see the issue both when updating from 8.8.0 and from 10.29.0 to 11.x? Which sign in provider are you using? |
@paulb777 Yes, both from 8.8.0 → 11.x and from 10.29.0 → 11.x - Log out issue happens for all 3 of our providers Apple, Google and Facebook. I was hoping 10.29.0 → 11.x would fix it but it does not. Only 8.8.0 → 10.29.0 works fine. |
Hi @JCsplash, I wasn't able to reproduce this with the Firebase Auth Quickstart app: https://github.com/firebase/quickstart-ios/tree/main/authentication My process: Are you able to reproduce this behavior in the above quickstart or a new simple project? Are you able to reproduce the issue on the simulator? |
Hi @ncooke3 I am having this same problem and I tried the app you mentioned at (https://github.com/firebase/quickstart-ios/tree/main/authentication) but found that the versions in the Podfile are not locked for Firebase/Auth and Firebase/Analytics. When I installed in my local environment with pod install their versions could only reach to 9.6.1, not 11+. When I changed to version 11.1.0 and also added the "Firebase" the forced logout issue started to appear. Please see attached the screenshot of the Podfile change I made |
@hcdino The Podfile.lock should provide details about why pods aren't updating. If you're still stuck, please open another issue and fill out the template. |
@ncooke3 The issue seems to be installing |
@JCsplash Please add your Podfile.lock to the Issue description. |
@paulb777 Just added both the working and not working Podfile.lock files to the issue description. Here's some screenshots of the diff that might be helpful. All i changed in my Podfile was from the top section to the bottom section.
|
@paulb777 @ncooke3 I think we narrowed down the issue and could reproduce the issue with the sample project as well. We're currently on version 8.8.0 If users have already logged in on 8.8.0, when they can only update to a maximum SDK version of 10.29.0 without getting logged out. However if a user first logged in on 10.29.0, then when updating to version 11.3.0 they remain logged in (this was the case nick tested earlier). To Summarize: @ncooke3 we were able to reproduce this using the sample project. can you try reproducing the issue too by logging in using an older SDK first like v8.8.0 and then upgrading to the newer SDK version? Here's the steps we took:
Would you mind looking into this and see if theres a way to prevent logging out when coming from an older SDK version? |
Awesome, thank you Nick! |
Hi @JCsplash, I do recall doing so and mentioned it when I tested the PR – #14069 (comment). I'll try again now with the released 11.5.0. |
I just tried again with 11.5.0 and was not able to reproduce the user being logged out. Using the sample app, I... :
With 11.5.0 installed, could you please double check the first few lines match in your project's copy of Firebase Auth's firebase-ios-sdk/FirebaseAuth/Sources/Swift/User/User.swift Lines 1716 to 1721 in 56d4c18
|
Hi Nick we tried this solution as well and it seems the user is indeed not logged out but the problem is that the providerData in the User object is empty for users with upgrade. Newly created users on the upgraded SDK does have the provider data included (not nil) in the User class. |
Hi Nick, I just test https://github.com/firebase/firebase-ios-sdk/pull/14169, it also didn't work Test Project: AuthenticationExample 1.Configure the project with the following dependencies in the Podfile:
2.Run pod install
5.Run pod install again to update the project Current Findings: |
Hi @ttcloud, in the modified 11.5.0 build, is |
Hi nick The second photo I pasted is the second call, I can't get userId, so it returns nil, then providerData is nil Have you tested with apple or google account? According to my steps, I can reproduce the issue on my side. Alternatively, you can try deleting and reinstalling everything, then follow my steps to test it again. |
The Google account I tested with did not have phone enabled as well. I will try again with a Google + Phone enabled account. |
I was able to reproduce the issue with a Google + Phone enabled account. A fix has been merged in #14185 and will make the 11.6.0 Firebase release this week. |
Description
When upgrading our firebase iOS SDK to version 11.0.0, 11.1.0, 11.2.0, 11.3.0, 11.4.0, 11.4.1 or 11.4.2, previously logged in users get logged out. However when upgrading to version 10.29.0, users remain logged in. Our app has ~200K daily active users and it wouldn't be feasible to have them all log out and re-login.
Here's some additional information for @ncooke3 and the team:
Auth.auth().useUserAccessGroup(_ accessGroup: String)
Auth.auth(). shareAuthStateAcrossDevices = true
We're currently on v8.8.0 and want to upgrade to the latest but if this issue doesn't get fixed we may have to just settle for 10.29.0. Is there any chance this could be fixed in an upcoming release? Any help would be very much appreciated!
EDIT: If a user's initial sign in was on version 8.8.0, the user can only upgrade to a maximum version of 10.29.0 without begin logged out. But if a user's initial sign in was on version 10.29.0, then that user can upgrade to 11.3.0 and still stay logged in. Going from 8.8.0 → 10.29.0 → 11.3.0 when the user originally signed in using 8.8.0 which still result in a logged out state.
Reproducing the issue
Steps to Reproduce:
Unsuccessful Attempts to Fix with 8.8.0 → 10.29.0 → 11.3.0
Firebase SDK Version
11.0.0, 11.1.0. 11.2.0, 11.3.0, 11.4.0, 11.4.1, 11.4.2
Xcode Version
15.3
Installation Method
CocoaPods
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
snippetReplace this line with the contents of your Package.resolved.
If using CocoaPods, the project's Podfile.lock
Expand
Working v10.29.0 Podfile.lock (no log out issue)
snippetExpand
Not Working v11.3.0 Podfile.lock (users get logged out)
snippetThe text was updated successfully, but these errors were encountered: