-
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
[Auth] Token doesn't have custom claims after user gets created #14026
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
@marinofelipe Thanks for the report. Which Firebase Auth APIs are you using? Do you know which API is behaving differently between 10.x and 11.x? Are you able to share a reproducible example? |
Hi @paulb777 , thanks for the quick reply. We are using a couple of methods from the Auth API like the following
And mainly Our issues happen solely when creating a user and then enriching a user token with custom claims via the BE.
What would be the best format here @paulb777 , any suggestions/preferences? Thank you |
@marinofelipe I did some code inspection today of Ideally I would need an app that is debuggable to track the differences between the two versions - or alternatively you could take a step a debugging |
Hi @paulb777 , thanks for looking into it and the quick update. I've run initial tests on our side and it looks like the issue was addressed on 11.5.0, likely by your fix. I'll run our automated and manual tests a few more times to confirm, and then get back to you, 🤞 . Ah, and sorry for the delay on the answer, I was out on vacation the last week. |
That's great. Thanks for letting us know. 😄 |
Hi @paulb777 , false alarm, the issue is still present. I'm working on a minified/sample app to send you, and I will also try to debug the |
Hi @paulb777 , some updates from my side
|
Hi @marinofelipe, thanks for the update. It's good to hear you have a workaround. Yes Auth was completely rewritten in Swift. The intent was to keep the public API behavior the same while doing so and we've re-reviewed and don't see differences. However, as you say, it's quite possible we missed something. Understood about the concerns about sharing details. If you send the placeholder, would you also send a fake that still demonstrates the issue? |
@paulb777 , I'm not sure it's possible to fully demonstrate it, unless there's a way to enhance tokens with custom claims via the iOS SDK? |
Description
At work we can't bump to the 11.* version of the firebase iOS SDK, the reason is that token custom claims are not there right after a user is created.
Until the latest 10.* version, v10.29.0, it all works fine, as below:
After bumping to any 11.* version of the SDK, here's what happens:
It looks somewhat similar to what was reported in #13830, although that one is for the Firestore API.
I also tried things like
We verified our whole Auth and BE stack, and found no issues whatsoever, which makes sense, the issue is only there when the iOS SDK gets bumped from 10.* to 11.*
Such issue is blocking us from updating
firebase-sdk
and all of its "sibling sdks", like Google Sign In and Google Tag Manager, which we need for important business cases.I appreciate the support, let me know if any other information is needed.
Reproducing the issue
Firebase SDK Version
11.*
Xcode Version
16.*
Installation Method
Swift Package Manager
Firebase Product(s)
Authentication
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Podfile.lock
snippetIf using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippetReplace this line with the contents of your Podfile.lock!
The text was updated successfully, but these errors were encountered: