Hi I'm looking to add a non user field to the payload in the auth process so I can included in the JWT token.
The request is like this:
{ "scriptId": "script1", "password": "password", "userName": "user1" }
config is like this:
"auth": {
"local": {
"usernameField" : "scriptId"
},
"token": {
"secret": "mysecret",
"payload": ["scriptId","userName"],
"expiresIn": "10min"
},
"successRedirect": "/chat.html"
}
How can I pass the userName parameter so I can retrieve it in the before hook of the auth/token service so I can it to the hook.data
Or if there's a better way to do it just let me know.