-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat(authentication): expose AdditionalUserInfo
#30
Comments
Hi @ssibrahimbas, |
AdditionalUserInfo
I'd like to add my own interest in being able to retrieve AdditionalUserInfo. Just taking the web implementation of this plugin for a google sign-in as an example, the signInWithPopup result is not exposed for us to use (which resolves with the required UserCredential). Following your example for using the JS SDK here is too late since the signInWithCredential (which resolves with the required |
AdditionalUserInfo
AdditionalUserInfo
Is there any update on this feature? This has become a problem for Apple login now as Apple is refusing apps that don't make use of the fullName data they provide to us, to pre-fill in user fields. Issue is that Apple doesn't return the users name in the idToken, instead it's available through the appleIDCredential.fullName field (only given the first time the user authorises your app). If we could expose AddtionalUserInfo (on iOS & Android), then this name field could be passed back to the web view to update the user instance there. Refer to this issue for full reference to the issue (still ongoing): |
@ssibrahimbas currently working on that (see #81). However, you should already have access to the name of the user (see |
The |
What du you mean exactly? You do not have to set |
Sorry I should have elaborated further, technically it's not a requirement. What I meant to say is if you want to sign in on the web view, you need to have |
Okay, now I understand the problem. I prioritize the issue. |
@robingenz any update on this one? |
No, not yet. I will try to look into this issue next week. I am currently writing my exams and therefore do not have much time. |
Thank you for the update. Good luck with your exams! |
For reference I have added the code for the main function that I had to modify for the Apple auth. I'm not a Swift developer so please excuse any bad code. It's important to note that Apple will only give the name on the very first attempt of that user authorising your app, any subsequent requests do not include the name field. If you need to test this I recommend visiting https://appleid.apple.com/ after each sign in, you can deauthorise your application there for a fresh sign in attempt.
|
@robingenz I hope exams are going well. What is the estimated lead time on resolving this? |
ETA is 2 weeks, I am unfortunately still busy, PRs are welcome |
You can now test the first dev version:
Example to get the Google user ID (Android): const result = await FirebaseAuthentication.signInWithGoogle();
const googleUserId = result?.additionalUserInfo?.profile?.sub; @typefox09 Unfortunately your problem had nothing to do with |
Is your feature request related to an issue? Please describe:
Yeah. In social media entries (Facebook, Google, GooglePlay, Twitter, Apple etc.), the user's id value connected to the provider does not appear. (GoogleId value does not come for login with Google.)
Describe your desired solution:
When the user logs in, the user's id value can be added according to the response that the provider returns. (I left a small demo below)
Describe the alternatives you are considering:
I mentioned it in the additional context section.
Additional context:
I have attached the codes to be edited. This is for android only. It works successfully when I tested it for Facebook, Google and Twitter.
Thanks for your time!
// updated one function
// updated two functions
update one Function
// updated three functions
// update two functions
update one function
update one function
The text was updated successfully, but these errors were encountered: