Hello, I hope you are all well
I know I’m probably asking a silly question but I’m new to strapi and the solutions I’ve found and tried from forums haven’t worked for me.
I am writing some custom endpoints in user-permissions and I would like to send jwt in those endpoints to improve the security of my application.
This is how I am implementing it:
const jwtToken = await strapi.service(‘plugin::users-permissions.jwt’).issue({ id: user.id });
ctx.response.body= {
jwt: jwtToken,
data: user
}
Adding these lines and testing the endpoint gives me a 403.