Adonisjs, Nodejs.
// find the user const user = // ... await auth.use('web').login(user) response.redirect().toPath(returnTo) This then gives us an authentication flow that takes us back to the previously requested URL after login. Security Note #1: If you have open redirects in your application, you should