r/reactnative • • Oct 23 '26

Question Need help on the approach to authentication I should use for my mobile app

I am developing a mobile app, which has a react native frontend, nest.js as the backend and for db and authentication, I'm planning to use supabase.

Now, currently as my app is in its initial stages I'm planning to use the supabase, as it free tier provides ample limits for my use case.

However, in later years if my app grows. I may think of switching to a cheaper alternative.

So, what I am planning to follow is for authentication, route the requests to my backend and inturn the backend will communicate with the supabase to authenticate the user. The backend will save the supabase token, create a separate session token for the user and send it back to the user.

My main reason for doing this is, I want the authentication to be provider independent and any changes needed should be done on the backend instead of the app.

Please let me know, if this approach is correct. What are the pros and cons. How much effort it would require to implement this. Will the security concerns increase if my backend starts handling this instead of the supabase only.

I also want to integrate the google and apple login as well. How will this approach affect it?

Also, if there any other better approaches, please let me know.

3 Upvotes

7 comments sorted by

2

u/Zain Oct 24 '26

I wouldn't proxy the login itself through Nest. Let the app sign in with the provider directly, keep all of it behind one AuthProvider in the app that covers email, Google, Apple and phone, and have the backend verify the provider's token. What actually keeps you portable is putting roles and permissions in your own Postgres instead of the provider, so the provider only owns who the user is. That's how I run Firebase Auth on an RN plus Node GraphQL setup. Also treat a user cancelling the Google or Apple sheet as a normal outcome, not an error.

1

u/not_dr_jaishankar 28d ago

Thanks a lot, will look into this approach

1

u/MysteriousAd530 Oct 26 '26

Are you planning to go passwordless in the future? Any sms or email verification? Any custom sso providers? How will you monitor your system doesn’t experience any downtime, are you happy to monitor security and implement security patches on your own? What about user management, things like password resets, session resets, are you ok with building this internally for yourself or doing it manually?

1

u/not_dr_jaishankar 28d ago

Passwordless - No

Email verification only for now

No custom sso providers

I am not looking to monitor incase its too much of a headload monitoring manually.

Depends on the effort needed to build manually.