Repository navigation
Conversation
Add hasMaximumLifetime and verify indefinite deadlines survive session serialization. Part of MOBILE-517
Contributor
Collaborator
Author
|
Resolve Session.kt conflict by keeping main's structure and moving the abandonAt semantics into KDoc. Make hasMaximumLifetime explicitly public and update the API dump for explicitApi()/apiCheck.
4 of 9 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Add
Session.hasMaximumLifetimeso callers can distinguish indefinite native sessions from finite expiration deadlines. Cover zero-deadline serialization and keep session status separate from lifetime.Companion to the backend native-session policy, clerk_go#22459 → #22460 → #22461 → #22462 → #22369. Part of MOBILE-517.
Other companions: iOS, JavaScript/Expo, Dashboard, edge regression tests, docs.
What to focus on
expireAt == 0means no maximum lifetime, including when a session is revoked.expireAtstays a requiredLong. The backend always sendsexpire_atas a number,0for sessions without a maximum lifetime, never omitted ornull: the client and server session serializers inapi/serialize/session.godeclare it as a plainint64withoutomitemptyand fill it withUnixMilliOrZero(clerk_go#22459).Nothing in the SDK compares
Session.expireAtagainst the current time, so a zero deadline is never treated as expired. Token refresh uses the session token's own expiry.Screenshots / video
No UI changes.
Summary by CodeRabbit