Skip to content

After loggin to app it redirect to localhost:5000/surveys  #65

Description

@ossmate

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions