Skip to content

[PLT-4135] Expose User.last_login_at in the Python SDK - #2070

Merged
pawelkozik-labelbox merged 3 commits into
developfrom
pawelkozik/plt-4135
Jul 28, 2026
Merged

[PLT-4135] Expose User.last_login_at in the Python SDK#2070
pawelkozik-labelbox merged 3 commits into
developfrom
pawelkozik/plt-4135

Conversation

@pawelkozik-labelbox

@pawelkozik-labelbox pawelkozik-labelbox commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

https://labelbox.atlassian.net/browse/PLT-4135

Context

  • Airbnb needs last-login information via the SDK to identify inactive users (e.g. no login in 90+ days)
  • GraphQL already exposes User.lastLoginAt (PLT-3309); the Python SDK did not map or request that field
  • Customers currently have user.created_at / user.updated_at but no last-login attribute on User

In scope

  • Expose user.last_login_at on SDK User objects returned by the usual user APIs (get_user, get_users, org users, etc.)
  • Value is a UTC datetime when known, or None until the user has logged in after last-login tracking was enabled
  • Keep Issue/Comment user fragments in sync so nested User objects still hydrate correctly

Out of scope

  • Account lockout / enforcement based on last login
  • Changing how or how often last login is recorded on the backend

Note

Low Risk
Additive SDK field mapping and fragment updates with no auth or enforcement logic changes.

Overview
Adds user.last_login_at on SDK User objects so customers can read last session time (login or workspace switch) for inactivity workflows. The value is a UTC datetime when the API provides it, or None until the user has logged in after last-login tracking was enabled.

Issue/comment GraphQL user fragments now request lastLoginAt so nested User instances on issues and comments hydrate the new field consistently. Integration and unit tests cover the attribute and mock payloads.

Reviewed by Cursor Bugbot for commit 9237b4f. Bugbot is set up for automated code reviews on this repo. Configure here.

Map GraphQL lastLoginAt onto the User model so customers can read last session time via the SDK.
Changelog updates belong in the release Prep PR per the Python SDK release runbook.
DbObject requires every declared field in the response payload, so the
issue fixtures need the new field to hydrate a User.
@pawelkozik-labelbox
pawelkozik-labelbox merged commit 22fe0aa into develop Jul 28, 2026
20 of 26 checks passed
@pawelkozik-labelbox
pawelkozik-labelbox deleted the pawelkozik/plt-4135 branch July 28, 2026 10:27
@pawelkozik-labelbox pawelkozik-labelbox mentioned this pull request Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants