panva / openid-client

OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
MIT License
1.83k stars 392 forks source link

fix(passport-strategy): ensure session is saved before redirecting #335

Closed josepapaianni closed 3 years ago

josepapaianni commented 3 years ago

Some session stores could be a little bit slow sometimes, specially the aaS ones during the initial request.

Also looks like it's the right way to handle sessions while doing redirects.

Probably will solve issues like: #237 #281

josepapaianni commented 3 years ago

*Fixing compatibility with Node 10 before reopening

panva commented 3 years ago

@josepapaianni thank you for attempting here but ultimately I would not accept even a passing PR here. The responsibility for ensuring sessions get saved lies with passport or the session mechanism itself, not with a passport strategy that is agnostic to the session store module or its "store" backend one uses.

More in #146

josepapaianni commented 3 years ago

Got it, thanks for the quick response. Do you mind to add a warning about this in the Strategy docs? (As a well known issue)