-
-
Notifications
You must be signed in to change notification settings - Fork 834
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API User Authentication doesn't update lastSeenAt #3025
Comments
Hmm, I'm not sure that obtaining a token should count as a "seen at" operation. Using the token, on the other hand, should already result in |
Well i can agree on obtaining a auth token specifically, but immediately following the /token request a new request to get the user data is sent off (with the auth token included) and that's basically saying "I'm requesting the data for my account, because I've just signed in"? Which presumably should update the lastSeenAt, but after testing multiple times lastSeenAt doesn't change from null. Even when navigating discussions and posting comments......but the moment i use the original Flarum client and it does it's 'hard refresh' after signing in, bam the lastSeenAt updates correctly on my client! So i don't know if it's something I'm doing specifically or what? |
Which endpoint are you hitting for this? |
|
Are you authenticating with the token in question? What do your request headers look like? |
Yes.
I compared this to Flarum's /login endpoint and the difference is I'm not sending a X-CSRF-Token or Cookie. The request is successful however and so the server should have validated my session given that outcome. |
Ah, I see. We have the logic to |
👍 🎉 Good job @askvortsov1 ! Appreciate the swift resolution too :) |
Bug Report
Current Behavior
When you use the API to fetch a session token during user authentication, it does not trigger the user online status to be correctly updated. The lastSeenAt attribute doesn't reflect this action and subsequent API calls also do not cause any effect. Effectively, you cannot correctly display when a user is online because the data will never update.
Steps to Reproduce
Expected Behavior
User's lastSeenAt attribute should reflect the time of login and/or further API requests sent to the server.
Environment
The text was updated successfully, but these errors were encountered: