Back

Best way to handle session token refresh in react native?

  • 0
  • Auth
Gigalink
9 Mar, 2024, 15:10

I found the "react-native-appwrite", managed to create a user / login a user, but then what's the best way to manage the whole lifecycle of session/token refresh? Is there an equivalent to "auth().onUserChanged(handleUser)" which exists in firebase, or "supabase.auth.onAuthStateChange" for supabase? Basically a listener that would detect change in the user session and act accordingly? (logout / refresh token & user, etc)?

TL;DR
Developers are seeking advice on managing session/token refresh in React Native using react-native-appwrite. They are looking for a listener similar to Firebase's "auth().onUserChanged(handleUser)" or Supabase's "supabase.auth.onAuthStateChange" to detect changes in user sessions and act accordingly (like logout or refresh token/user).
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more