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

⚡fixes #746 App takes you to login screen after being logged in for a while #817

Merged
merged 5 commits into from
Jul 26, 2024

Conversation

greatsamist
Copy link
Contributor

@greatsamist greatsamist commented Jul 25, 2024

😵 Post-Mortem 😵

Fixes #746

Summary

Fixed a bug that takes users to the login screen after being logged in for a while.

Impact

  • Services Affected:Authentication service, user session management
  • User Impact: Users will no longer be unexpectedly logged out after an hour of inactivity. This change improves user experience by extending the session duration to 30 days.

Root Cause Analysis

The Privy token was set to expire after an hour, causing users to be redirected to the login screen to log in again after the token expired.

Resolution and Recovery

Instead of using the auth token, we now use the Privy refresh token. The Privy refresh token takes 30 days to expire, can only be used once, and is refreshed with a new one upon use. This change ensures that users remain logged in for up to 30 days without interruption.

Lessons Learned

  1. Ensure token expiration times are aligned with user session expectations to avoid unexpected logouts.
  2. Implement a refresh token strategy to extend session durations securely.
  3. Regularly review and update authentication and session management strategies to enhance user experience and security

Copy link

vercel bot commented Jul 25, 2024

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

Name Status Preview Comments Updated (UTC)
streameth-platform ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2024 8:11am

@greatsamist greatsamist added the bug Something isn't working label Jul 25, 2024
@greatsamist greatsamist changed the title ⚡fix App Auto logout during sessions ⚡fix App takes you to login screen after being logged in for a while Jul 25, 2024
@greatsamist greatsamist marked this pull request as ready for review July 26, 2024 07:48
@Mario-SO Mario-SO added the high priority Needs to be done ASAP label Jul 26, 2024
@greatsamist greatsamist changed the title ⚡fix App takes you to login screen after being logged in for a while ⚡fixes #746 App takes you to login screen after being logged in for a while Jul 26, 2024
@greatsamist greatsamist requested a review from Mario-SO July 26, 2024 09:56
@greatsamist greatsamist merged commit 3158297 into develop Jul 26, 2024
4 checks passed
@greatsamist greatsamist deleted the auth-fix branch July 26, 2024 10:00
@greatsamist greatsamist requested review from Eric-Vondee and Mario-SO and removed request for Eric-Vondee and Mario-SO July 26, 2024 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority Needs to be done ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] App takes you to login screen after being logged in for a while.
2 participants