Adonisjs, Nodejs.
with) To the following: // Add the import: import { returnToKey } from '#middleware/auth_middleware' // In our login handler: const returnTo = session.pull(returnToKey, '/admin') // Wipe the session to prevent session fixation (this // is more necessary for OAuth based flows): session.regenerate()