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
When calling lock.getUserInfo() the returned objects' keys are camelCased, e.g. userMetadata,
but when I try to update the userMetadata by using the Auth0 API it expects the patch objects' keys to be snake_cased, e.g. user_metadata and also the response from the call is snake_cased.
Is this intended behavior?
Do I have to forgo lock.getUserInfo and do a "manual" API-request to get user info instead or is there way I can update user which utilize the same naming convention as lock.getUserInfo?
The text was updated successfully, but these errors were encountered:
Good catch, auth0.js (the js sdk used underneath by Lock) is normalizing all the responses to be camel case but it should not do it with the response from userInfo.
I will fix this on auth0.js and the next release (10.10.0 next week) it will be fixed.
Additionally, the toCamelCase helper seems to be transforming arrays into objects. {app_metadata: {groups: ["a","b","c"]}}
becomes {appMetadata: {groups: {0:"a", 1:"b", 2:"c"}}}
Lock version: 10.9.1
When calling
lock.getUserInfo()
the returned objects' keys are camelCased, e.g.userMetadata
,but when I try to update the
userMetadata
by using the Auth0 API it expects the patch objects' keys to be snake_cased, e.g.user_metadata
and also the response from the call is snake_cased.Sample code:
Is this intended behavior?
Do I have to forgo lock.getUserInfo and do a "manual" API-request to get user info instead or is there way I can update user which utilize the same naming convention as
lock.getUserInfo
?The text was updated successfully, but these errors were encountered: