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

Restore login session upon reload #413

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

pklaschka
Copy link
Member

With this change, credentials get stored in the sessionStorage in an obfuscated way upon login.

When the login route gets loaded, the application trys to automatically sign in using any stored credentials.

Credentials (and thus, the login session) are automatically once either:

  1. the tab/browser gets closed (cf. https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage), or
  2. the logout() function gets called (e.g., when the user logs out manually), or
  3. a login attempt with the stored credentials fails.

This significantly improves the user experience since refreshing pages works without any issues, now.

Also, the developer experience is significantly improved as developers no longer need to sign back in everytime a reload happens during development.

With this change, credentials get stored in the `sessionStorage` in an obfuscated way upon login.

When the login route gets loaded, the application trys to automatically sign in using any stored credentials.

Credentials (and thus, the login session) are automatically once either:

1. the tab/browser gets closed (cf. https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage), or
2. the `logout()` function gets called (e.g., when the user logs out manually), or
3. a login attempt with the stored credentials fails.

This significantly improves the user experience since refreshing pages works without any issues, now.

Also, the developer experience is significantly improved as developers no longer need to sign back in everytime a reload happens during development.
Copy link
Member Author

pklaschka commented Jan 12, 2024

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

Copy link
Member

@fussel178 fussel178 left a comment

Choose a reason for hiding this comment

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

LGTM 🥍

@pklaschka pklaschka merged commit b246181 into main Jan 17, 2024
17 checks passed
@pklaschka pklaschka deleted the 01-12-Restore_login_session_upon_reload branch January 17, 2024 16:53
Copy link
Member Author

Merge activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌷 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants