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

Avoid session revalidation on each page change #9

Open
grant-h opened this issue Oct 18, 2017 · 0 comments
Open

Avoid session revalidation on each page change #9

grant-h opened this issue Oct 18, 2017 · 0 comments
Labels

Comments

@grant-h
Copy link
Collaborator

grant-h commented Oct 18, 2017

Angular uses client side rendering. This means we need to retrieve state in to the DOM on each page load. Things like the username, account ID, and email are all currently fetched through the /session/validate endpoint. This is not ideal as the Single Page Application must wait for this API call to resolve. Not to mention it creates log spam.

Instead we should follow the advice of http://maffrigby.com/maintaining-session-info-in-angularjs-when-you-refresh-the-page/ to make certain items persistent and avoid making this API call. Note that these persistent cookies must be accessible from JavaScript and will act as a simple storage mechanism for session data. None of this data will be trusted by the server and session validity will be implicitly verified upon other API requests.

@grant-h grant-h added the bug label Oct 18, 2017
grant-h pushed a commit that referenced this issue May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant