Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different field naming in React and React Native User interface #794

Open
6 tasks done
XaviPolser opened this issue Aug 30, 2024 · 0 comments
Open
6 tasks done

Different field naming in React and React Native User interface #794

XaviPolser opened this issue Aug 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@XaviPolser
Copy link

Checklist

Description

Hello team! We noticed that users could not log into a React Native app despite being able to access the web. We use a shared User Context Provider between the two in a monorepo setup. While debugging, we noticed that the culprit was a different field naming in the User interface, more specifically, the email verified field. We require users to verify the email to access our application.

I'm attaching a screenshot that showcases the discrepancy:

image

On the left, the React Native types using camelCase, on the right, the React ones using a dash email_verified.

It's not a big deal but it took us a while to find the root cause so I thought we would share it.

Reproduction

  1. Authenticate a user in a vanilla React app and a React Native app.
  2. Console.log the user object.
  3. Notice the different naming in the email verified field.

Additional context

No response

auth0-react version

2.2.4

React version

18.2.0

Which browsers have you tested in?

Chrome, Edge, Safari, Firefox, Opera, Other

@XaviPolser XaviPolser added the bug Something isn't working label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant