In the console where we can determine the session length... I want to ask (let's assume I set it to 7 days) if this means that the session will expire 7 days after creation or after user inactivity. Thanks
In total
The check is against the createdAt
attribute
https://github.com/appwrite/appwrite/blob/master/src/Appwrite/Auth/Auth.php#L367
I see. How then do you suggest I detect users who have not been online or active for (let's say) the past 30 days?
Another question is: Will the "current" property of the session object be changed to false after session has expired?
What you mean by change to false?
This.
This means if you ask for all sessions, like for a few devices then to the current one will be true
If the session is expired then no session will return whatsoever
I see. That helps
That's a good question.
A best solution would be Appwrite adds it to the account.get()
endpoint and part of the user model.
For now, you'll have to create some collection and let it update by:
- Function that will update as the user entering the App
- Directly from the client SDK.
Then you can query that collection by checking only rows that after X
date.
To make sure this collection won't get bigger and bigger you can make the user_id
unqiue, then only enter once and then update the user last seen.
Perfect. Makes perfect sense
Last question...
Can the $createdAt attribute be queried with the greater than and less than queries? Cos I was having a feeling they may only work on integer attributes
Yes it could
You'll need to send a ISO date to the query
Alright. Thank you very much
Recommended threads
- Upgrade Issue
Am having issue upgrading my appwrite account to pro as my card number is 19 and the required input is 16 digit
- createEmailPasswordSession Error using S...
Did someone succeed using SSR approach for login?
- Trying to Figure out how to delete a use...
If i have a button in an app that allows a user to delete their account, can I not just call a function from my swift app to Appwrite to have the account delete...