adonisjs / auth

Official Authentication package for AdonisJS
https://docs.adonisjs.com/guides/auth/introduction
MIT License
191 stars 65 forks source link

[V5]custom the default auth target tables/model #183

Closed dirszas14 closed 2 years ago

dirszas14 commented 2 years ago

is there any way to change the default target other that User model? i've seen you can only set model User only.

config/auth.ts image

contracts/auth.ts image

I made this 2 tables because every users has different feature so I separately. I did this on Laravel works as well.

dirszas14 commented 2 years ago

i found it! it weirds

you must define this on your model

@column({ serializeAs: null }) public password: string

@column() public rememberMeToken?: string

thetutlage commented 2 years ago

Closing since not actionable.