Issue with Account Overwriting When Using EXPO
After creating three projects on my computer, I logged in using Naver OAuth on two mobile devices.
Each of these two projects is an individual EXPO app.
One of them also has a backend server built with Express.
Here’s the issue:
After logging in with Naver account A, if I try logging in again with a different Naver account B, the app still logs me in as account A.
Upon checking the database, there is no record of account B — it doesn’t exist.
What’s even more confusing is that when I log the output from the mapProfileToUser function, it clearly shows the profile data for account B!
How is this even possible?
I've attached my auth configuration file below for your review.
5 Replies
hello?
Heyo , your setup seems to be pretty complex, could you link a minimal reproduction repo so i can see whats up locally and check if its something from better-auth's end ? 🙏🏼
The bug has been resolved. However, it seems that when using Prisma, a different bug still occurs.
For example, if I log in with the account a@naver.com while using Prisma, and then try to log in with another account like b@naver.com, the session still logs me in as a@naver.com.
This issue persists regardless of the device used.
Although the mapProfileToUser function shows logs as if a different account is being logged in, in reality, the login does not change.
It appears this bug only occurs when Prisma is involved.
---
It appears in oauth login
i just pr
Prisma with oauth with the same expo setup ?
yes