I am using AdonisJS V6 ("@adonisjs/core": "^6.17.2") and auth version "@adonisjs/auth": "^9.3.1", for backend development. I have two models User and Admin. Both models have email and password fields. Both User and Admin have totally different data. I don't want to use role based authentication. I want to build a multiple model authentication for my system. Something like auth.use('user').generate() and auth.use('admin').generate() would be great for me. I would be very very grateful if anyone finds time to solve the problem. Thanks in advance. Feel free to ask anything.
Regards. I
Add a comment
|
1 Answer
you can import jwt for that, it helps guard the user and admin differently
1 Comment
Kiryl Famin
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review