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

Token must be read from cookie/event #13

Open
bijujoseph opened this issue Oct 10, 2017 · 3 comments
Open

Token must be read from cookie/event #13

bijujoseph opened this issue Oct 10, 2017 · 3 comments
Assignees

Comments

@bijujoseph
Copy link
Member

bijujoseph commented Oct 10, 2017

Uploads are long-running and invokes disparate services. There is a potential chance that token will get refreshed after the invocation of file uploader, but before the individual calls finish.
fileUploader(content, jwt,callback)
JWT can be a string or a callback, but Observables won't bind well results back if we have multiple callbacks. (I need to research more here)
Short-term solutions are

  1. in the absence of jwt, either read the token from cookie (but will kill pure node clients)
  2. is to have an event raised against window or a global event emitter, to which the client reacts and change the token on the fly.
@bijujoseph bijujoseph self-assigned this Oct 10, 2017
@bijujoseph bijujoseph changed the title Token must be read from cookie Token must be read from cookie/event Oct 10, 2017
@joshboley
Copy link
Contributor

I would expect that the token in the cookie is always the most up-to-date token, so it would be advantageous to always use that value. That is what we're doing in the MA UI.

@bijujoseph
Copy link
Member Author

https://github.com/CMSgov/qpp-style/issues/90 a related issue on qpp-style.

@bijujoseph
Copy link
Member Author

May not be relevant anymore as we move towards HTTP Session style token refresh.

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

No branches or pull requests

2 participants