When restarting my app, is there a way I can have the user log back in using the session object, so the user doesn’t have to re-enter their credentials?
Since the SDK automatically persists sessions, the user is already authenticated the next time they come back to your app.
The typical pattern is to do the following on app start:
- Call
account.get()2a. If that returns successfully, the user is already authenticated and you can redirect them into the app. 2b. If an exception is thrown, they don't have a session so redirect them to the login page
Recommended threads
- Running into a server error on my self-h...
Hey everyone, I'm running into a server error on my self-hosted setup after updating to v1.19.0. The issue only happens during user creation and deletion. Ever...
- Storage System
Hey guys, quick question regarding massive storage scaling. I’m working in digital forensics and I’m constantly dealing with huge binary disk images, usually be...
- _APP_OPTIONS_ROUTER_PROTECTION
Hi Everyone, I just setup a fresh 1.9.0 on a server. Configured everything and now when i try to connect to appwrite for first time setup i get a _APP_OPTIONS_R...