passportjs redirect current url code example
Example 1: hwo to send token on redirection in passport
res.cookie('token', token, ...);
res.redirect(...);
Example 2: hwo to send token on redirection in passport
res.set('x-token', token);
res.redirect(...);