"Bad HTTP authentication header format" error when using patchUser [react-native-auth0]

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

I’m not familiar with React Native, but maybe the comments and solutions here help:

https://github.com/auth0/react-native-auth0/issues/197

https://github.com/auth0/react-native-auth0/issues/148

Thanks, @mathiasconradt.

I looked at those, and I’ve tried those solutions to no success.
Just wanted to see if anyone here solved it, trying to prevent me having to refactor and write the auth module myself and specifying the API-calls myself.
But it looks like that might just be the way to go… :slightly_frowning_face: