I'm using AccountKit for phone sign up right now in our mobile app. As AccountKit will be deprecated soon so we are migrating with firebase phone sign up. I have set up a new user/Sign-up flow but still confused about old users when they log-in again using a new sign-in method(Firebase).
Current Login Process:
- Client request with the access token.
- Server request to account kit with an access token and get user data with UID
- By this UID I check in current database user present or not.
Problem:
When old user tries to sign in through firebase then I'll get different UID(UID of firebase) which is not present in my database so it will consider it as a new user.
Backend: Node js
Can someone help me what would be the best approach to migrate?