After loggin to app it redirect to localhost:5000/surveys instead of localhost:3000/surveys
authRoutes.js
app.get(
'/auth/google/callback',
passport.authenticate('google'),
(req, res) => {
res.redirect('/surveys');
}
);
setupProxy.js -> instead of proxy in package.json
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function(app) {
app.use(
'/auth/google',
createProxyMiddleware({
target: 'http://localhost:5000',
changeOrigin: true,
})
);
app.use(
'/api/*',
createProxyMiddleware({
target: 'http://localhost:5000',
changeOrigin: true,
})
);
};
console identification URI
http://localhost:5000
http://localhost:3000
autorizated URI
http://localhost:5000/auth/google/callback
http://localhost:3000/auth/google/callback
I just simply get error Cannot GET /surveys
and browser URL is http://localhost:5000/surveys
After loggin to app it redirect to localhost:5000/surveys instead of localhost:3000/surveys
authRoutes.js
setupProxy.js -> instead of proxy in package.json
console identification URI
http://localhost:5000http://localhost:3000autorizated URI
http://localhost:5000/auth/google/callbackhttp://localhost:3000/auth/google/callbackI just simply get error
Cannot GET /surveysand browser URL is
http://localhost:5000/surveys