I am new to molecular Js, can someone please help me in understanding ,how to pass the context of current request in action handlers?
to be more specific, In authenticate method of API gateway I am validating token and decoding it. and I need this decoded token object in action handler methods.
I have tried with ctx.meta , but getting null when i try to accessed it action handler.
Thanks in advance.
I was just updating the property in authenticate method.
ctx.meta.user = myUserObject;
But actually, we should return a Promise with resolution.
return Promise.resolve(myUserObject);
it automatically sets the ctx.meta.user with myUserObject