Skip to content
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

fix(signer): expire sessions on focus and on timer after init #1112

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

moldy530
Copy link
Collaborator

@moldy530 moldy530 commented Oct 29, 2024

Pull Request Checklist


PR-Codex overview

This PR focuses on enhancing session management in the SessionManager class by implementing a mechanism to automatically clear expired sessions.

Detailed summary

  • Added a new property clearSessionHandle to track session expiration timers.
  • Modified clearSession method to clear the timeout if it exists.
  • Introduced registerSessionExpirationHandler method to set a timeout for session expiration.
  • Updated setSession method to utilize registerSessionExpirationHandler for new sessions.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Oct 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 10:13pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 29, 2024 10:13pm

dphilipson
dphilipson previously approved these changes Oct 29, 2024
Copy link
Contributor

@dphilipson dphilipson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for being so quick! Left a comment.

account-kit/signer/src/session/manager.ts Outdated Show resolved Hide resolved
@moldy530 moldy530 force-pushed the moldy/expire-sessions branch from da1296a to c090ea2 Compare October 29, 2024 22:00
Copy link
Contributor

@dphilipson dphilipson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for the changes!

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