0

I am using express as my middleware and have the browser URL as http://sampleDomain/AUTH/login and after successful login I would like to show the URL as http://sampleDomain/

app.use('/AUTH',authHelper)
app.use('/*',helper)

initially if User not logged in then map to authHelper and once if the credentials entered by user are valid then I need to change the browser URL from http://sampleDomain/AUTH/login to http://sampleDomain/ so that app.use('/*',helper) can be used.

visizky
  • 701
  • 1
  • 8
  • 27
  • Does this answer your question? [In express how do I redirect a user to an external url?](https://stackoverflow.com/questions/28352871/in-express-how-do-i-redirect-a-user-to-an-external-url) – Vrecer Jul 01 '20 at 21:20
  • Any update on this? – Venkatesh A Mar 02 '22 at 18:24

1 Answers1

0

A simple res.redirect() would do the job.

Venkatesh A
  • 1,875
  • 1
  • 19
  • 23