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:
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
Authenticate a user in a vanilla React app and a React Native app.
Console.log the user object.
Notice the different naming in the email verified field.
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:
On the left, the React Native types using
camelCase
, on the right, the React ones using a dashemail_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
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