You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case of multiple node services, scaled horizontally, passport use (which register a Strategy by name) and authenticate (which get back a Strategy previously registered by name) do not scale well because all the nodes would not shared the same private _strategiesstore object.
You can have one request initiated on a node but ended on another node for the sso callback when having load balancing and those can have different Strategy configuration for the same name. This can happen when you update your Strategies configuration but restart your node one by one for a high quality of service.
In case of multiple node services, scaled horizontally, passport
use
(which register a Strategy by name) andauthenticate
(which get back a Strategy previously registered by name) do not scale well because all the nodes would not shared the same private_strategies
store object.You can have one request initiated on a node but ended on another node for the sso callback when having load balancing and those can have different Strategy configuration for the same name. This can happen when you update your Strategies configuration but restart your node one by one for a high quality of service.
A better way to handle this is to recreate the Strategy for each request and never rely on a store object (so no cache), but the
authenticate
method get in the way because it only rely on the_strategies
internal store See https://github.com/jaredhanson/passport/blob/master/lib/authenticator.js#L463The text was updated successfully, but these errors were encountered: