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
app.use(expressSession(cfg));
app.use(passport.initialize());
app.use(passport.session());
passport.use('local', new localStrategy({}, sessions.localStrategy.authenticate));
and then, method with passport.authenticate() sets cookie for supersite.org
How can I make passport js set cookie for megasite.org if request came from megasite.org?
Simply omitting 'cookie' field from configuration does not look good.
CORS is configured alright.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is it possible?
I am trying to make a express backend which is supposed to serve two js frontends, on different domains.
Only two, no wildcards.
Here is my config:
then I initialize this as follows:
and then, method with passport.authenticate() sets cookie for supersite.org
How can I make passport js set cookie for megasite.org if request came from megasite.org?
Simply omitting 'cookie' field from configuration does not look good.
CORS is configured alright.
Beta Was this translation helpful? Give feedback.
All reactions