I'm using railwayjs for my new project, which uses passport framework for authentication. In the environment.js
file, i'm require
ing and configuring the passport details. I've a controller auth
which does the login. So inside an action in auth controller i need to access the same passport variable i've used in environment.js
. how do i do that? am i missing something?
You can simply create a global, though, railwayjs specific alternative may exist.
// environment.js
global.Auth = {user: "123"};
// Another file;
console.log(Auth); // {user: "123};