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
In the current version, the profile returns the original data
Developers need to write a logic for each provider to extract general information such as username, avatar, id, email, etc.
// Every developer has to write similar code:letuserInfo={}switch(grant.provider){case'github':
userInfo.id=profile.iduserInfo.avater=profile.avatar_urluserInfo.nickname=profile.nameuserInfo.email=profile.emailbreakcase'weibo':
userInfo.id=profile.iduserInfo.avatar=profile.profile_image_urluserInfo.nickname=profile.nameuserInfo.email=profile.emailbreakcase'qq':
userInfo.id=profile.openiduserInfo.avatar=profile.figureurl_2,userInfo.nickname=profile.nicknamebreak}
So maybe it's better to let grant extract these common fields and keep the original data to profile.raw
That's a good idea, but definitely not a priority.
Having all profile URLs set and tested for all providers, plus any potential fix needed for the underlying HTTP client is a good step forward.
Also keep in mind that we're talking about 180+ providers, and for an endpoint that's largely not standardized, besides the OpenID Connect userinfo one. One thing is to support multiple OAuth implementations that might differ a little, another is to support basically a random endpoint.
In the current version, the profile returns the original data
Developers need to write a logic for each provider to extract general information such as username, avatar, id, email, etc.
So maybe it's better to let grant extract these common fields and keep the original data to
profile.raw
The text was updated successfully, but these errors were encountered: