Custom user authentication using simple_jwt

I changed the default user into a custom user to add roles , I used to deal with authentication using simple_jwt but when I switched to the new user and created the views , I was able to register but the login failed , any solution ?

There’s a lot of things that may be wrong or just one thing, if you don’t provide any details about the implementation, we can’t help you.

Thank you for your interest , I figured out that simple_jwt library target only the built in user model (auth_users table in database) and when you create custom user model it don’t recognize the table since it was modified by adding or deleting some fields so to add custom_roles I created a new table containing roles field and the user id as onetoonefield this allows me to make a joint in views to retrieve the user infomations , then I customised ObtainPairToken serializer of simple_jwt library by retreiving the role using the user’s id then I’ve added the role as new key to the previous serializer