Are these two user and business types of roles/accounts? If they are, you don't need 2 types of tokens, you'll need Role Based Access System.
JWT auth for 2 types of users
Hello.
I'm building an API which will serve a website and devices. Currently, the user is authenticated using JWT using laravel package. The problem is that I have 2 types of users in my application. One is the User class and the other is another class - Business. The package is configured to work with one type of user, hence I don't know how to authenticate the Business.
How can I solve this issue? I basically need to generate 2 types of tokens, one is for the user (so when the package is parsing the token and authenticating it, it will return a user object) and the other token is for the business (so when the package is parsing and authenticating the token it will return a business object)
@isaackearl maybe you have faced this issue before?
Please or to participate in this conversation.