Waffleophagus
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
And this is a text file for the migration code cause I guess it broke the character limit, hope it helps the next dev!
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
Here's the pre-auth mapping for the migration:
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
I'll happily share the migration stuff if you like
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
I... think... that worked!!!!
1. Anon on login
2. When they submit an email to sign up/login via OTP, make a pivot table that is just
3. log the anon user out
4. email sent
5. verify code
6. do the data migration
7. Success!
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
If I can give my TestFlight folks a functional app where they have a one off awkward onboarding, that’s fine.
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
If I can get the rest of my app to a happy place I’ll happily fork and mess with it, but my priority at this point is the other stuff I still gotta do till my self imposed deadline at the end of next month to have a TestFlight build I’m happy with. I do think (hope?) the logout when you attempt to login behind the scenes may be the fix hopefully
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
I know that y’all are attempting to be a solid competitor to supabase, and they have a very clear path to do this thing, and convex’s DX is way better, so if I can help, totally willing
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
Totally, I get that I may be trailblazing, I’d love to contribute back the solution if we find one. For what it’s worth, my plan is to have a TestFlight build with friends for a while, and if we don’t have a solution, to those folks I’ll just say “kill the app and reopen it and you’ll be golden” but before I ship, which my goal is “sometime this year” I’ll want a clean flow. I’m totally willing to help however I can to get there and share it. The anon “upgrade” flow is really powerful imo. Imma try the logout of anon account when you go to the login page, or maybe when you hit the “send email” button, and see if that works. If it doesn’t imma probably have to backburner this for a bit.
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
But if that’s the flow I gotta do for now I will.
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
Wouldn’t logging them out from their anon account when they hit the login button work?
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
That’s a terrible flow
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
A new user record (along with an authAccount) is created upon first hitting the first of the two OTP endpoints
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
New user record is the flow that the auth library does currently, hence the necessity of the migration
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
That said, yea, got the migration running super smoothly now, thanks again for the help on that part!
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
I will happily share any code you wanna see on this, and honestly if we find a good solution I’ll happily open source it even, but I won’t be able to access the code till I’m home
27 replies
CCConvex Community
•Created by Waffleophagus on 5/1/2025 in #support-community
Logging into new user "doesn't work" on react native since I store state?
User goes through the OTP process, if they are logging into an existing account, it appears that nothing happens, they are kicked to the Home Screen and it looks like nothing changed. I logged the hell out of the flow and it also appears that it even refreshes the anonymous token? If you leave/kill the app and come back, the login takes effect. The worst case scenario is if you go in, add a bunch of data, then sign up, the migration we talked about DOES take effect immediately and all the data vanishes. It’s safely on the new account, but you have to leave/kill the app and come back to see it.
I fully acknowledge this very well be a “skill issue” this is the first time I’ve messed with auth from this side of the isle (I’ve done the server jwt auth at previous jobs)
27 replies