Best practices for Appwrite authentication in React Native — External API wrapper safe or direct SDK
- 0
- Self Hosted
- React Native
- Android
- Cloud
Hi Appwrite community,
I’m building a React Native app and planning to use Appwrite for authentication. I have some questions about the architecture and security:
Is it safe to create an external API wrapper (e.g., a Next.js backend route) that calls createEmailPasswordSession using the Appwrite SDK, then returns the access and refresh tokens back to the React Native app?
Since React Native doesn’t have browser-like cookie handling, I would need to manually store tokens securely on the device. Is this approach considered secure?
Will the Appwrite server recognize the user properly if I proxy authentication requests through my backend server, or will it treat all requests as coming from the server itself?
Alternatively, is it better to have the React Native app call the Appwrite SDK directly, and if so, what’s the best way to securely manage tokens in this case?
I want to ensure my authentication flow is secure and follows best practices, especially in the context of React Native apps.
Any practical advice or experiences would be greatly appreciated!
Thanks a lot!
Recommended threads
- Flutter OAuth2 webAuth Bug?
I created with flutter an app where I can login in with my Microsoft Account. When I compile it to Web (WASM) or Android (aab) then there is no problem what so ...
- Function running for more than 2 hours i...
This is my projectID: 669fe01b003800dd0503 Cloud functionID is 696ea05400147eb8eb3b I hope this doesn't count against my GB-hours?
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, it’s mention that only setup client with endpoint / api key is enou...