1

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

1 Answer 1

0

you can import jwt for that, it helps guard the user and admin differently

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.