You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for your great work. This helps me a lot!
However, I think it would be better to add the feature to get user profile when onSuccess is called, because most of client dev will use the info of user profile, much more than token or clientId.
it can be additional, for instance, return Credential which contains getProfile(), so that dev can easily get the result of user profile.
This feature can be simply added with logic below.
The text was updated successfully, but these errors were encountered:
ChrisCho-H
changed the title
OnSuccess return object would be better if user profile, not Credential itself
OnSuccess would be better to return Credential containing method to get user profile
Sep 20, 2022
I tried to make the package to have a similar API for all cases
GoogleLogin
useGoogleLogin (implicit flow)
useGoogleLogin (authorization code flow)
the issue was, for each case, google returns a different response
for GoogleLogin google just returns id_token which includes user info directly encoded in base64 which we can decode in multiple ways (one of them is your suggestion)
But in useGoogleLogin
authorization code flow -> google returns code which we can exchange with our backend, and for profile, info backend can decode id_token on the server or we can decode id on the client
if I made decoding id_token for first case only as it's direct return from google, Any user of the package will expect the same behavior for the hooks to return also user profile
so I sticked with google response & decoding is the responsible of the developer (which is small step & easy)
Hi, thanks for your great work. This helps me a lot!
However, I think it would be better to add the feature to get user profile when onSuccess is called, because most of client dev will use the info of user profile, much more than token or clientId.
it can be additional, for instance, return Credential which contains getProfile(), so that dev can easily get the result of user profile.
This feature can be simply added with logic below.
If I miss something, please let me know!
The text was updated successfully, but these errors were encountered: