Skip to content

🐛 Refresh login session after Zitadel login return - #635

Open
josphat-otieno wants to merge 5 commits into
elewa-git:developfrom
josphat-otieno:fix/login-session-refresh
Open

🐛 Refresh login session after Zitadel login return#635
josphat-otieno wants to merge 5 commits into
elewa-git:developfrom
josphat-otieno:fix/login-session-refresh

Conversation

@josphat-otieno

Copy link
Copy Markdown
Contributor

Summary

Fix the login page so OpenCrane refreshes the session when the browser returns from external Zitadel authentication and redirects authenticated users to / immediately.

Changes

  • refresh /auth/me when the login page loads
  • refresh again on browser return via pageshow, focus, and visibilitychange
  • clean up listeners with DestroyRef
  • keep the existing redirect for authenticated users

Why

Users could successfully authenticate in Zitadel and still remain on /login until another action refreshed the session. This makes the login page resilient to that return flow.

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.

1 participant