Hi,
I’m creating a React Native app that uses the 'react-native-auth0’ package/SDK for authentication.
I have no issues creating sessions and letting users sign up or log in. However, updating users profiles (attributes and meta data) results in errors.
I’ve spent a lot of time yesterday and this morning searching the internet and this community for similar issues, but nothing seems to resolve my issue. So, hopefully someone in this community can help me.
SDK: react-native-auth0 version 2.3.0
Here’s my code:
const auth0 = new Auth0({
domain: Config.AUTH0_DOMAIN,
clientId: Config.AUTH0_CLIENT_ID,
});
auth0
.users({accessToken})
.patchUser({
id: myUserId,
email: this.state.userEmail,
given_name: this.state.userGivenName,
family_name: this.state.userFamilyName,
picture: this.state.userAvatarSource,
connection: 'some-connectionID',
client_id: Config.AUTH0_CLIENT_ID,
metadata: {
address:
this.state.userAddress +
', ' +
this.state.userCity +
' ' +
this.state.userZipcode +
', ' +
this.state.userCountry,
},
})
.then(console.log)
.catch(console.error);
Thanks in advance for your help.
Cheers