#Usage of Async storage after auth success in React Native

2 messages · Page 1 of 1 (latest)

lone parcel
#

I have been seeing multiple implementations of auth across tools like Clerk, Supabase and it seemed like they are using async storage or secure storage as some form of storage mechanism to store some jwt token or something (not super fluent with auth stuff).

I see a function call named account.createSession in Appwrite docs. Is this function responsible to storing some token as well locally on device?

Asking since I want to be super sure the auth works well and is handled well by Appwrite itself and there's left for me to be done beyond what Appwrite functions handle. Thanks!

void smelt
#

account.createSession is used to create a session via a userId & a secret that is usually received after implementing either of -

  1. Magic URL Sign-in
  2. Email or SMS OTP Sign-in

Reference - https://appwrite.io/docs/references/cloud/client-web/account#createSession

Appwrite handles everything related to Auth and you don't have to incorporate anything from outside, unless you use OAUTH2 as that requires vendor specific implementations.