Describe the bug
Using express-session the passport strategy is trying to associate value in the session in memory.
Right after that, it performs a redirect, which doesn't wait for the session to be updated in the store. Causing sometimes to the expected value after the redirect not be available in the store yet.
The express session, for instance, calls .save automatically when the request is finished. But recommends calling .save before redirecting to a different resource. Eg.: https://github.com/expressjs/session#sessionsavecallback
To Reproduce
It's challenging to reproduce that, because the store connection needs to be experiencing some latency.
I was able to do that by using with postgres + knex as store.
Expected behaviour
A clear and concise description of what you expected to happen.
Environment:
- openid-client version: 2.4.5
- node version: v8.11.2
Additional context
Add any other context about the problem here.
Describe the bug
Using express-session the passport strategy is trying to associate value in the session in memory.
Right after that, it performs a redirect, which doesn't wait for the session to be updated in the store. Causing sometimes to the expected value after the redirect not be available in the store yet.
The express session, for instance, calls
.saveautomatically when the request is finished. But recommends calling.savebefore redirecting to a different resource. Eg.: https://github.com/expressjs/session#sessionsavecallbackTo Reproduce
It's challenging to reproduce that, because the store connection needs to be experiencing some latency.
I was able to do that by using with postgres + knex as store.
Expected behaviour
A clear and concise description of what you expected to happen.
Environment:
Additional context
Add any other context about the problem here.