Skip to content

feat(session): Store session data in the db instead of LocalStorage - #7192

Merged
gatzjames merged 10 commits into
Kong:developfrom
gatzjames:feat/user-data-in-db
Mar 22, 2024
Merged

feat(session): Store session data in the db instead of LocalStorage#7192
gatzjames merged 10 commits into
Kong:developfrom
gatzjames:feat/user-data-in-db

Conversation

@gatzjames

@gatzjames gatzjames commented Mar 20, 2024

Copy link
Copy Markdown
Contributor

Local Storage is not reliable to persist data across app restarts.

Highlights:

  • Creates a new model in the database to persist the user session
  • Uses the new database model in the app instead of Local Storage to read/write the session
  • Migrate existing sessions stored in local storage to the db?

Closes INS-3633

Next steps:

  • Cleanup the session module and simplify the logic
  • On later versions remove the migration from localStorage
  • On unauthorised response from our API we should log out the user
  • Explore multi-database per account or similar approach

@gatzjames
gatzjames requested a review from a team March 20, 2024 11:16
@gatzjames gatzjames self-assigned this Mar 20, 2024
@marckong

Copy link
Copy Markdown
Contributor

@gatzjames will the user model be excluded from the git and cloud syncs?

@gatzjames

Copy link
Copy Markdown
Contributor Author

@gatzjames will the user model be excluded from the git and cloud syncs?

Correct it's not shared like the settings model

@gatzjames
gatzjames force-pushed the feat/user-data-in-db branch from 99f47ee to 230b4ae Compare March 22, 2024 10:06
marckong
marckong previously approved these changes Mar 22, 2024
@gatzjames
gatzjames merged commit 277599e into Kong:develop Mar 22, 2024
@gatzjames
gatzjames deleted the feat/user-data-in-db branch March 22, 2024 11:06
@sentry

sentry Bot commented Mar 28, 2024

Copy link
Copy Markdown

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: listen EADDRINUSE: address already in use :::8080 __node_internal_captureLargerStackTrace(node:in... View Issue

Did you find this useful? React with a 👍 or 👎

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