Reference
Advanced usage
Bring your own user model, or compose the primitives into a login flow of your own design.
Custom user models#
Add your own fields to the user model. Role checks and the CLI respect it:
Don't import fastauth's built-in User model in the same app when using a
custom one; two table models for the same table will conflict.
Custom authentication logic#
The same primitives FastAuth's own routes use are public:
auth.token_manager, auth.password_manager, auth.authenticate_user(), and
RoleManager. Anything the built-in routes do, your code can do too.