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
I have tested and re-tested numerous times and have isolated this issue to only occur with routes with parameters.
I worked around this issue by using query string parameters instead of url parameters. This is not a duplicate of other TokenError related issues, btw.
The text was updated successfully, but these errors were encountered:
The following code (with url parameter "redirect") causes the issue:
'use strict';
import express from 'express';
import passport from 'passport';
import {setTokenCookie} from '../auth.service';
var router = express.Router();
router
.get('/:redirect', passport.authenticate('google', {
failureRedirect: '/signup',
scope: [
'profile',
'email'
],
session: false
}))
.get('/callback', passport.authenticate('google', {
failureRedirect: '/signup',
session: false
}), setTokenCookie);
export default router;
The issue is not encountered with the following code:
'use strict';
import express from 'express';
import passport from 'passport';
import {setTokenCookie} from '../auth.service';
var router = express.Router();
router
.get('/redirect', passport.authenticate('google', {
failureRedirect: '/signup',
scope: [
'profile',
'email'
],
session: false
}))
.get('/callback', passport.authenticate('google', {
failureRedirect: '/signup',
session: false
}), setTokenCookie);
export default router;
I have tested and re-tested numerous times and have isolated this issue to only occur with routes with parameters.
I worked around this issue by using query string parameters instead of url parameters. This is not a duplicate of other TokenError related issues, btw.
The text was updated successfully, but these errors were encountered: