Recent Activity
Here's what @mojtaba-rajabi has been up to this past year
-
Anniversary Thanks for being an Acocasts member for 1 year
-
Commented on post How To Make Your AdonisJS Authentication Login Case-Insensitive
export default class User extends compose(BaseModel, AuthFinder) { public static async findForAuth(identifier: any, value: any) { const field = /^\d+$/.test(value) ? 'phone' : 'username' const user= await User.query().where(field, value).first() if (!user) { 👈 fill inertia errors.username prop and redirect back to login page } if(!user.isActive){ 👈 fill inertia errors.username prop with user is inactive and redirect back to login page } return user }Copied! -
Commented on post How To Make Your AdonisJS Authentication Login Case-Insensitive
hi . thanks for excellent tutorials!
i added a custom findForAuth to my user class. i want check user is active after find user and befor send for password checking. i need a way to return exception in inertia errors props with username key but not any success:
in class User -
Completed lesson Setting Up Tailwind CSS