when someone is logged in through api and validate using JWT token then by the help of custom code in controller we can get the user value

async create(ctx) {
        //for user details
        ctx.state.user //this contains all the information about user