Solved
In the engine, you can access the main application using 'main_app'. In this variable, you have access to the current user, if you come up with. To access devise current_user, all you have to do is
main_app.scope.env['warden'].user
The utility stores the user inside the initial key in the session. Because it uses internal security to authenticate and store data in the session.
If there is an alternative solution, please let me know.
source
share